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

Build issues #507

Open
wants to merge 57 commits into
base: development
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
791783d
Improve build process and minor build-related code updates
LSchwiebert Apr 26, 2023
bf4a10b
Correct EOL
LSchwiebert Apr 26, 2023
199a8eb
Fix a minor memory leak
LSchwiebert May 5, 2023
03a6064
Make sure the correct abs() function is used with floats
LSchwiebert May 5, 2023
48fa348
Update for recent code changes
LSchwiebert May 9, 2023
23e1de0
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert May 9, 2023
9490665
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert May 9, 2023
e31e3a9
Add support for Clang on Linux
LSchwiebert May 17, 2023
0d1facd
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert May 22, 2023
7fa1e74
Restore to development version
LSchwiebert May 23, 2023
bff8c90
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Jun 14, 2023
b9554ad
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Jun 27, 2023
5f941bb
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Jun 27, 2023
c28d871
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Jul 25, 2023
414a644
Fixes the gcc compiler issues but not linker
LSchwiebert Aug 12, 2023
b43e807
Final changes to resolve GPU linking issues
LSchwiebert Aug 14, 2023
d3342d8
Update GOMC Website in Readme file
LSchwiebert Aug 14, 2023
523b9f3
Update web link for CMake
LSchwiebert Aug 14, 2023
2bc9c6c
Remove unused use_tidy variable. Just set CMake flag
LSchwiebert Aug 14, 2023
6b28702
Clean up README.md per Codacy style
LSchwiebert Aug 14, 2023
4f9d4fa
README.md clean up per Codacy Style guidelines
LSchwiebert Aug 14, 2023
dde4892
README.md clean up per Codacy Style guidelines
LSchwiebert Aug 14, 2023
3f21ee9
Change OpenMP pragma for compatibility with old Intel compilers
LSchwiebert Aug 27, 2023
1587a19
Change OpenMP pragma for compatibility with old Intel compilers
LSchwiebert Aug 27, 2023
fa1b2f0
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Sep 4, 2023
1bb817f
Merge branch 'development' into build-issues
LSchwiebert Sep 10, 2023
c23a326
Update CMakeLists.txt for handling clang-tidy
LSchwiebert Sep 19, 2023
6d61334
Merge branch 'build-issues' of https://github.com/GOMC-WSU/GOMC into …
LSchwiebert Sep 19, 2023
8d16bf0
Remove Endian Tests since Endian.h is no longer used in GOMC
LSchwiebert Sep 21, 2023
411ed83
Standardize guards on header files. Add some missing ones.
LSchwiebert Sep 21, 2023
11d44cd
Print error message if CUDA does not support this compiler
LSchwiebert Sep 21, 2023
850848f
Build test executables only for specified ensembles
LSchwiebert Sep 21, 2023
823c6e4
Warning instead Status message for compiler incompatible with CUDA
LSchwiebert Sep 22, 2023
b62c64b
Standardize guards on header files
LSchwiebert Sep 22, 2023
17ee84d
Fix syntax error in CMakeLists.txt for warning message
LSchwiebert Sep 22, 2023
d3da126
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Sep 26, 2023
28a4664
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Nov 28, 2023
b690cb7
Remove link time optimization from the build process
LSchwiebert Jan 8, 2024
118e917
Remove Intel LLVM Compiler detection until CUDA supports it
LSchwiebert Mar 28, 2024
0bc3977
Clean up some #define statements and comments on the #endif for heade…
LSchwiebert Mar 28, 2024
8173bdd
Resolve Codacy-detected error for builds with test
LSchwiebert Mar 28, 2024
fbf6c9f
Handle ensemble names when building the test configs
LSchwiebert Mar 28, 2024
0a97b18
Build CUDA code for GPU executables
LSchwiebert Jul 8, 2024
55726de
Don't include GPU calls in CPU builds
LSchwiebert Jul 8, 2024
afe876d
Don't call RotationMatrix::UniformRandom with prng() calls as functio…
LSchwiebert Jul 10, 2024
c99f658
Remove old UniformRandom function calls
LSchwiebert Jul 10, 2024
d3dd0e7
Fix typo in comment
LSchwiebert Nov 19, 2024
aab3c02
Add entries to print newer OpenMP versions
LSchwiebert Nov 23, 2024
e6073f4
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Nov 27, 2024
69b4ebc
Patch to handle older OpenMP versions
LSchwiebert Nov 30, 2024
64eba6e
Updates to build on Windows with Visual Studio
LSchwiebert Nov 30, 2024
64f8f80
Clarify Windows build
LSchwiebert Dec 1, 2024
713622a
Updates to resolve MSVC warnings and improve MSVC build flags
LSchwiebert Dec 3, 2024
f451add
Pass more forcefield parameters to the GPU for consistent values
LSchwiebert Dec 13, 2024
57181f0
Reformat source files using clang format
LSchwiebert Dec 13, 2024
2017878
Merge branch 'development' of https://github.com/GOMC-WSU/GOMC into b…
LSchwiebert Dec 13, 2024
0e3f3e6
Update for latest development branch patches
LSchwiebert Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove link time optimization from the build process
LSchwiebert committed Jan 8, 2024
commit b690cb7339b227f51e1edd69192811c1fa48afdd
27 changes: 3 additions & 24 deletions CMake/GOMCCUDASetup.cmake
Original file line number Diff line number Diff line change
@@ -15,24 +15,10 @@ endif()
# Set architecture flags based on the CMake version
# Once CMake 3.23 has been available for a while, we should just use
# set(CMAKE_CUDA_ARCHITECTURES all) and remove the if block
# Can't get CUDA link time optimization enabled for all architectures directly, so need to do one-by-one.
if(NOT GOMC_OPT OR (CMAKE_BUILD_TYPE STREQUAL "Debug"))
if (CMAKE_MAJOR_VERSION VERSION_GREATER 3 OR CMAKE_MINOR_VERSION VERSION_GREATER_EQUAL 23)
set(CMAKE_CUDA_ARCHITECTURES all)
else()
set(CMAKE_CUDA_ARCHITECTURES 60;70;75;80)
endif()
if (CMAKE_MAJOR_VERSION VERSION_GREATER 3 OR CMAKE_MINOR_VERSION VERSION_GREATER_EQUAL 23)
set(CMAKE_CUDA_ARCHITECTURES all)
else()
set(CMAKE_CUDA_ARCHITECTURES OFF)
set(CMAKE_CUDA_COMP_FLAGS ${CMAKE_CUDA_COMP_FLAGS} "SHELL:-gencode arch=compute_60,code=lto_60")
set(CMAKE_CUDA_COMP_FLAGS ${CMAKE_CUDA_COMP_FLAGS} "SHELL:-gencode arch=compute_70,code=lto_70")
set(CMAKE_CUDA_COMP_FLAGS ${CMAKE_CUDA_COMP_FLAGS} "SHELL:-gencode arch=compute_75,code=lto_75")
set(CMAKE_CUDA_COMP_FLAGS ${CMAKE_CUDA_COMP_FLAGS} "SHELL:-gencode arch=compute_80,code=lto_80")
# set(CMAKE_CUDA_LINK_FLAGS ${CMAKE_CUDA_LINK_FLAGS} "SHELL:-arch=sm_60")
set(CMAKE_CUDA_LINK_FLAGS ${CMAKE_CUDA_LINK_FLAGS} "SHELL:-arch=sm_70")
# set(CMAKE_CUDA_LINK_FLAGS ${CMAKE_CUDA_LINK_FLAGS} "SHELL:-arch=sm_75")
# set(CMAKE_CUDA_LINK_FLAGS ${CMAKE_CUDA_LINK_FLAGS} "SHELL:-arch=sm_80")
set(CMAKE_CUDA_LINK_FLAGS ${CMAKE_CUDA_LINK_FLAGS} -dlto)
set(CMAKE_CUDA_ARCHITECTURES 60;70;75;80)
endif()

include_directories(src/GPU)
@@ -51,13 +37,6 @@ set(CMAKE_CUDA_STANDARD_REQUIRED true)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED true)

# Turn off warning that CUDA files were not compiled with the -ipo flag
if(GOMC_OPT)
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "IntelLLVM")
set(CMAKE_LINK_FLAGS ${CMAKE_LINK_FLAGS} -diag-disable=11003)
endif()
endif()

# Disable the warning on deprecated GPU targets
set(CMAKE_CUDA_COMP_FLAGS ${CMAKE_CUDA_COMP_FLAGS} -Wno-deprecated-gpu-targets)
set(CMAKE_CUDA_LINK_FLAGS ${CMAKE_CUDA_LINK_FLAGS} -Wno-deprecated-gpu-targets)
24 changes: 11 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -29,23 +29,21 @@ endif(NOT CMAKE_BUILD_TYPE)
#Set compile and link flags. Need to do it this way so that we can pass
#the source compiler flags to NVCC properly.
if(GOMC_OPT)
set(CMAKE_INTEL_COMP_FLAGS -Ofast -ipo -xHost)
set(CMAKE_INTEL_CUDA_COMP_FLAGS "SHELL:-Xcompiler -Ofast" "SHELL:-Xcompiler -ipo" "SHELL:-Xcompiler -xHost")
set(CMAKE_INTEL_LINK_FLAGS -Ofast -ipo -xHost)
set(CMAKE_GNU_COMP_FLAGS -flto -fno-fat-lto-objects -m64 -march=native)
set(CMAKE_INTEL_COMP_FLAGS -Ofast -xHost)
set(CMAKE_INTEL_CUDA_COMP_FLAGS "SHELL:-Xcompiler -Ofast" "SHELL:-Xcompiler -xHost")
set(CMAKE_INTEL_LINK_FLAGS -Ofast -xHost)
set(CMAKE_GNU_COMP_FLAGS -O3 -m64 -march=native)
set(CMAKE_GNU_CUDA_COMP_FLAGS "SHELL:-Xcompiler -O3" "SHELL:-Xcompiler -m64" "SHELL:-Xcompiler -march=native")
# set(CMAKE_GNU_CUDA_COMP_FLAGS "SHELL:-Xcompiler -O3" "SHELL:-Xcompiler -flto" "SHELL:-Xcompiler -fno-fat-lto-objects" "SHELL:-Xcompiler -march=native")
set(CMAKE_GNU_LINK_FLAGS -flto -fno-fat-lto-objects -m64 -march=native)
set(CMAKE_CLANG_COMP_FLAGS -O3 -flto -march=native)
set(CMAKE_CLANG_CUDA_COMP_FLAGS "SHELL:-Xcompiler -O3" "SHELL:-Xcompiler -flto" "SHELL:-Xcompiler -march=native")
set(CMAKE_CLANG_LINK_FLAGS -O3 -flto -march=native)
set(CMAKE_GNU_LINK_FLAGS -m64 -march=native)
set(CMAKE_CLANG_COMP_FLAGS -O3 -march=native)
set(CMAKE_CLANG_CUDA_COMP_FLAGS "SHELL:-Xcompiler -O3" "SHELL:-Xcompiler -march=native")
set(CMAKE_CLANG_LINK_FLAGS -O3 -march=native)
endif()

if(GOMC_ASAN)
set(CMAKE_GNU_COMP_FLAGS ${CMAKE_GNU_COMP_FLAGS} --param=max-vartrack-size=100000000 -fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_GNU_CUDA_COMP_FLAGS ${CMAKE_GNU_CUDA_COMP_FLAGS} "SHELL:-Xcompiler --param=max-vartrack-size=100000000"
"SHELL:-Xcompiler -fsanitize=address" "SHELL:-Xcompiler -fno-omit-frame-pointer")
set(CMAKE_GNU_LINK_FLAGS ${CMAKE_GNU_LINK_FLAGS} --param=max-vartrack-size=100000000 -fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_GNU_COMP_FLAGS ${CMAKE_GNU_COMP_FLAGS} -fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_GNU_CUDA_COMP_FLAGS ${CMAKE_GNU_CUDA_COMP_FLAGS} "SHELL:-Xcompiler -fsanitize=address" "SHELL:-Xcompiler -fno-omit-frame-pointer")
set(CMAKE_GNU_LINK_FLAGS ${CMAKE_GNU_LINK_FLAGS} -fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_CLANG_COMP_FLAGS ${CMAKE_CLANG_COMP_FLAGS} -fsanitize=address -fno-omit-frame-pointer)
set(CMAKE_CLANG_CUDA_COMP_FLAGS ${CMAKE_CLANG_CUDA_COMP_FLAGS} "SHELL:-Xcompiler -fsanitize=address" "SHELL:-Xcompiler -fno-omit-frame-pointer")
set(CMAKE_CLANG_LINK_FLAGS ${CMAKE_CLANG_LINK_FLAGS} -fsanitize=address -fno-omit-frame-pointer)