Skip to content

Commit

Permalink
Merge pull request #10 from susilehtola/native
Browse files Browse the repository at this point in the history
Solve some issues with BUILD_MARCH_NATIVE
  • Loading branch information
sunqm authored May 24, 2021
2 parents ee880fa + cfb94b7 commit f53e5cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
endif()
set(CMAKE_VERBOSE_MAKEFILE OFF)
option(BUILD_MARCH_NATIVE "gcc flag -march=native" on)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -O2")
if(BUILD_MARCH_NATIVE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native -O2")
else()
# This appears to be the lowest version that compiles
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3")
endif()
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -unroll-aggressive -ipo ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-math-errno")
Expand Down
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Version 4.4.0 (2021-05-04):
* Add new integral type int1e_grids
* Fix cache size type
* Refactor cart2sph
* Code now compiles with -march=native by default
Version 4.1.3 (2021-04-13):
* Fix memory address int32 overflow for heavily contracted basis
Version 4.1.2 (2021-04-10):
Expand Down

0 comments on commit f53e5cf

Please sign in to comment.