Dear Kuo Lu, On 03:03 Thu 23 Jun , Kuo Lu wrote: > I have uploaded my work > <https://github.com/kuolu/LibGeoDecompCommandlineTool> so far. I mainly > studied your bouncingspheres example. And I’m treating the object as a point > in one dimension. > > A few problems for you: > > 1.) I put my folder (including a CMakeList.txt just like every other > examples) in /libgeodecomp/src/examples/ and added > "add_subdirectory(commandlineTools)” in > /libgeodecomp/src/examples/CMakeLists.txt but it still gives me
please don't do this. I had sent you a link to a repository[1] which details how to use CMake to build a project which is using LibGeoDecomp (instead of nesting it in LibGeoDecomp's source tree). > CMake Error at src/examples/commandlineTools/CMakeLists.txt:5 > (add_executable): > add_executable called with incorrect number of arguments My best guess is that the variable SOURCES is not set. This is done automatically in LibGeoDecomp's CMake scripts. You should not use such facilities. Instead, just manually list your source files here (i.e. main.cpp). > CMake Error at src/examples/commandlineTools/CMakeLists.txt:6 > (set_target_properties): > set_target_properties Can not find target to add properties to: > libgeodecomp_examples_commandlineTools This fails because line 5 wasn't able to create the target. > CMake Error at src/examples/commandlineTools/CMakeLists.txt:7 > (target_link_libraries): > Cannot specify link libraries for target > "libgeodecomp_examples_commandlineTools" which is not built by this > project. Dito. > Do I need to add more lines in CMakeLists files? If so, which one? Please do not nest your code in LibGeoDecomp's tree. Instead, use a separate directory and set your build up to use LibGeoDecomp as explained in the repository[2]. > 2.) Looking at your > /libgeodecomp/src/examples/bouncingspheres/main.cc, I figured that I > will use SerialSimulator<Container>, which means I will need a > Container, initializer, and a writer class just like you did. I > figured this out as I was writing this email while reading the API > documentation… thanks! Yes, the SerialSimulator is a good start. For a start, you should be able to use the BoxCell directly as the container, of a multi-container (see DECLARE_MULTI_CONTAINER_CELL()) once you use different types of bodies. > 3.) what debugger do you use? I cannot use g++ to compile because it > cannot find <libgeodecomp/config.h> but cmake keeps giving me > errors. The debugger is largely independent from the compiler. Right now you're using clang++, which is fine. I mostly debug with gdb, but right now your code isn't even compiling so you don't yet need a debugger. > 4.) To be honest, looking at how much I have done so far, I think > I’m far from what I have promised. I thought I know a lot but I > realize that I do not. I want to be honest to myself and deserve a > bad comment in the midterm evaluation, I feel sincerely sorry both > to you and to me. Like I said: making steady progress is now most important. You can still pass the evaluation if you move swiftly. Best -Andreas [1] https://github.com/gentryx/libgeodecomp_website_examples/blob/master/building_cmake_projects/CMakeLists.txt [2] https://github.com/gentryx/libgeodecomp_website_examples/tree/master/building_cmake_projects -- ========================================================== Andreas Schäfer HPC and Supercomputing Institute for Multiscale Simulation Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany +49 9131 85-20866 PGP/GPG key via keyserver http://www.libgeodecomp.org ========================================================== (\___/) (+'.'+) (")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination!
signature.asc
Description: Digital signature
_______________________________________________ hpx-users mailing list [email protected] https://mail.cct.lsu.edu/mailman/listinfo/hpx-users
