{"id":16755437,"url":"https://github.com/mxmlnkn/pscbfm","last_synced_at":"2025-03-16T06:40:33.187Z","repository":{"id":78492476,"uuid":"122522443","full_name":"mxmlnkn/pscbfm","owner":"mxmlnkn","description":"Optimized CUDA Version of the Parallel Bond Fluctuation Model","archived":false,"fork":false,"pushed_at":"2018-04-06T08:15:15.000Z","size":279,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-22T19:12:04.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mxmlnkn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T19:06:50.000Z","updated_at":"2018-04-06T08:10:20.000Z","dependencies_parsed_at":"2023-07-08T07:01:28.231Z","dependency_job_id":null,"html_url":"https://github.com/mxmlnkn/pscbfm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxmlnkn%2Fpscbfm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxmlnkn%2Fpscbfm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxmlnkn%2Fpscbfm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mxmlnkn%2Fpscbfm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mxmlnkn","download_url":"https://codeload.github.com/mxmlnkn/pscbfm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243835942,"owners_count":20355611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T03:22:31.312Z","updated_at":"2025-03-16T06:40:33.164Z","avatar_url":"https://github.com/mxmlnkn.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compilation\n\n    git clone --recursive git@bitbucket.org:mxmlnkn/mt-progwork.git\n    cd mt-progwork \u0026\u0026 mkdir build \u0026\u0026 cd build\n    cmake .. -DCUDA_ARCH:STRING=35 \u0026\u0026 make -j 2\n\nTested with:\n\n - `GIT 1.7.1`, `GNU make 3.8.1`, `CMake 3.9.0`, `g++ 5.3.0`, `CUDA 9.0.176`\n - `GIT 1.7.1`, `GNU make 3.8.1`, `CMake 3.3.1`, `g++ 4.8.0`, `CUDA 7.0.28`\n - Does not work with gcc older than `4.8.0`, because those versions can't cope with some initializer lists. See also CMake [`cxx_generalized_initializers`](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm).\n - Does not work with gcc older than `4.7.0`, because `-std=c++11` was added in `4.7.0`\n\nNote that Fermie `compute_20` is deprecated since CUDA 9.\n\nIn order to understand what is behind the CMake procedure you can also try to compile the main program manually with:\n\n    cd build\n    CCOPTS='-Xcompiler -Wall,-Wextra,-O3,-msse2,-mssse3,-fexpensive-optimizations -DNDEBUG -std=c++11'\n    INCLUDES='-I../extern -isystem ../extern/LeMonADE/include '\n    nvcc $INCLUDES $CCOPTS -c -o mainCUDASimulatorGPUScBFM_AB_Type.cpp.o ../src/pscbfm/mainCUDASimulatorGPUScBFM_AB_Type.cpp\n    nvcc $INCLUDES $CCOPTS -c -o UpdaterGPUScBFM_AB_Type.cu.o -Xcompiler -fPIC -gencode arch=compute_30,code=sm_30 ../src/pscbfm/UpdaterGPUScBFM_AB_Type.cu\n    nvcc $CCOPTS -o pscbfm mainCUDASimulatorGPUScBFM_AB_Type.cpp.o UpdaterGPUScBFM_AB_Type.cu.o -L../extern/LeMonADE/lib --cudart static -lpthread -ldl -lrt -lLeMonADE -lcuda -Xcompiler -static-libstdc++,-static-libgcc\n\nYou can try a test run with e.g.:\n\n    ./pscbfm -i ../tests/inputPscBFM.bfm -e ../tests/resultNormPscBFM.seeds -o result.bfm -m 10000 -s 10000\n\nA more extensive test routine is available with `checkSc` in ``. E.g. to benchmark and profile everything on Taurus do:\n\n    . ../src/pscbfm/testCorrectness.sh\n    checkSc -b -p --force-compile --folder \"$folder\" --batchjob-prefix 'srun --cpu-freq=highp1 --gpufreq=2505:692' --arch 35 \"$benchmark\"\n\nSee also `benchmarkK80.pbs`. Most options are optional: on a system without the need for SLURM or PBS, you might already have success with `checkSc`, which only runs the simulation once checking for the correctness, `checkSc -b`, which runs the simulation multiple times to get a statistic for the manual counters, or with `check -p`, which does all the above and also creates extensive and time expensive profiling data files.\n\n\n# Known Bugs\n\n## When g++ 7 is installed and used:\n\n    /usr/bin/ld: CMakeFiles/SimulatorCUDAGPUScBFM_AB_Type.dir/src/pscBFMLegacy/SimulatorCUDAGPUScBFM_AB_Type_generated_UpdaterGPUScBFM_AB_Type.cu.o: relocation R_X86_64_32S against '.bss' can not be used when making a shared object; recompile with -fPIC\n    /usr/bin/ld: final link failed: Nonrepresentable section on output\n\n### Workaround:\n\n - Add `-fPIC` to `CUDA_NVCC_FLAGS` in `CMakeLists.txt`. Can't say since which version this error started appearing\n\n\n## Compilation of graphColoring.h fails:\n\n    /sw/taurus/libr aries/cuda/7.0.28/bin/nvcc ~/mt-progwork/src/pscBFMLegacy/UpdaterGPUScBFM_AB_Type.cu -c -o ~/mt-progwork/build/CMakeFiles/SimulatorCUDAGPUScBFM_AB_Type.dir/src/pscBFMLegacy/./SimulatorCUDAGPUScBFM_AB_Type_generated_UpdaterGPUScBFM_AB_Type.cu.o -ccbin /sw/global/compilers/gcc/4.9.1/bin/gcc -m64 -Xcompiler ,\\\"-Wall\\\",\\\"-Wextra\\\",\\\"-O3\\\",\\\"-msse2\\\",\\\"-mssse3\\\",\\\"-fexpensive-optimizations\\\",\\\"-DNDEBUG\\\" -std=c++11 -lineinfo -gencode arch=compute_35,code=sm_35 -Xcompiler -fPIC -DNVCC -I/sw/taurus/libraries/cuda/7.0.28/include -I~/mt-progwork/extern/LeMonADE/include -I/sw/taurus/libraries/cuda/7.0.28/include\n    ~/mt-progwork/src/pscBFMLegacy/graphColoring.h:19:17: error: default argument for template parameter for class enclosing ‘\u003clambda\u003e’\n             []( T_Neighbors const \u0026 x, T_Id const \u0026 i ){ return x[i].size(); },\n                     ^\n\n### Workaround:\n\n - works with 4.9.3, but not with 4.9.1\n - for sake of easier use this works now for older compilers by not providing default functors\n\n\n## Changing the major compiler version leads to problems:\n\n - LeMonADE needs to be built with the same version of `g++`, e.g. when compiling LeMonADE with g++ 5, but pscbfm with g++ 4.9, segfaults which are very time-consuming to track down will appear because of ABI incompatibilities.\n - CMake doesn't yet automatically check for this and rebuild LeMonADE if it finds it uses a different version\n\n### Workaround:\n\n - Remake LeMonADE with the current compiler version: `cd extern/LeMonADE/; rm -r build; mkdir build; cd build; cmake -DINSTALLDIR_LEMONADE=.. DCMAKE_INSTALL_PREFIX=.. ..; make install`\n - You can also just delete the built library and call cmake again to let it rebuild LeMonADE automatically as long as the `PULL_LEMONADE` option is set to `ON`: `rm ../extern/LeMonADE/lib/libLeMonADE.a; cmake ..`\n\n## Call of overloaded swap is ambiguous\n\n    In file included from /sw/global/compilers/gcc/5.3.0/include/c++/5.3.0/deque:64:0,\n                     from /sw/global/compilers/gcc/5.3.0/include/c++/5.3.0/stack:60,\n                     from /home/user/progwork/src/AnalyzerMsd.tpp:7,\n                     from /home/user/progwork/src/singleLinearChain/main.cpp:38:\n    /sw/global/compilers/gcc/5.3.0/include/c++/5.3.0/bits/stl_deque.h:579:8: error: call of overloaded ‘swap(std::_Deque_base\u003cGraphIteratorDepthFirst\u003cMolecules\u003cLoki::GenLinearHierarchy\u003cLoki::Typelist\u003cMonomerAttributeTag, Loki::NullType\u003e, FeatureHolder, Vector3D\u003cint\u003e \u003e, 7u, int\u003e, alwaysTrue\u003e::IteratorPosition, std::allocator\u003cGraphIteratorDepthFirst\u003cMolecules\u003cLoki::GenLinearHierarchy\u003cLoki::Typelist\u003cMonomerAttributeTag, Loki::NullType\u003e, FeatureHolder, Vector3D\u003cint\u003e \u003e, 7u, int\u003e, alwaysTrue\u003e::IteratorPosition\u003e \u003e::iterator\u0026, std::_Deque_base\u003cGraphIteratorDepthFirst\u003cMolecules\u003cLoki::GenLinearHierarchy\u003cLoki::Typelist\u003cMonomerAttributeTag, Loki::NullType\u003e, FeatureHolder, Vector3D\u003cint\u003e \u003e, 7u, int\u003e, alwaysTrue\u003e::IteratorPosition, std::allocator\u003cGraphIteratorDepthFirst\u003cMolecules\u003cLoki::GenLinearHierarchy\u003cLoki::Typelist\u003cMonomerAttributeTag, Loki::NullType\u003e, FeatureHolder, Vector3D\u003cint\u003e \u003e, 7u, int\u003e, alwaysTrue\u003e::IteratorPosition\u003e \u003e::iterator\u0026)’ is ambiguous\n        swap(this-\u003e_M_finish, __x._M_finish);\n\n### Workaround\n\n    Try to use `-D__STL_CONFIG_H`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxmlnkn%2Fpscbfm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmxmlnkn%2Fpscbfm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmxmlnkn%2Fpscbfm/lists"}