simsopt icon indicating copy to clipboard operation
simsopt copied to clipboard

Fix #411 compile flags on Apple Silicon Ubuntu Docker

Open krystophny opened this issue 1 year ago • 5 comments

krystophny avatar May 02 '24 18:05 krystophny

@andrewgiuliani or @landreman - can you verify if this is fine? A cleaner solution would be a systematic check for compiler options, but the present fix at least makes it compile in our setup.

krystophny avatar May 02 '24 18:05 krystophny

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 91.71%. Comparing base (e8c5433) to head (f595f84). Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #412      +/-   ##
==========================================
+ Coverage   91.36%   91.71%   +0.34%     
==========================================
  Files          75       75              
  Lines       13150    13150              
==========================================
+ Hits        12015    12061      +46     
+ Misses       1135     1089      -46     
Flag Coverage Δ
unittests 91.71% <ø> (+0.34%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 15 '24 14:05 codecov[bot]

Looks fine to me. Does anyone else have comments?

landreman avatar May 15 '24 15:05 landreman

Let me cross check this with what I got for docker build on Mac. Can we also get the docker file uploaded?

I'll review this next week after I get back to work.

Bharat

On Wed, May 15, 2024, 8:27 AM Andrew Giuliani @.***> wrote:

@.**** commented on this pull request.

In CMakeLists.txt https://github.com/hiddenSymmetries/simsopt/pull/412#discussion_r1601850691 :

@@ -56,9 +56,14 @@ else() unset(COMPILER_SUPPORTS_MARCH_NATIVE CACHE) CHECK_CXX_COMPILER_FLAG(-march=native COMPILER_SUPPORTS_MARCH_NATIVE) if(COMPILER_SUPPORTS_MARCH_NATIVE)

  • set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast")
    
  • elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64")
  • set(CMAKE_CXX_FLAGS "-O3 -mcpu=apple-a14 -mfma -ffp-contract=fast")
    
  •    message(STATUS "${CMAKE_HOST_SYSTEM_PROCESSOR}")
    
  •    if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "aarch64")
    
  •     set(CMAKE_CXX_FLAGS "-O3 -march=native -ffp-contract=fast")
    
  •    else()
    
  •        set(CMAKE_CXX_FLAGS "-O3 -march=native -mfma -ffp-contract=fast")
    
  •    endif()
    
  • elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "arm64")
  • set(CMAKE_CXX_FLAGS "-O3 -mcpu=apple-a14 -ffp-contract=fast")
    

why are there two branches here, one for aarch64 and another for arm64?

— Reply to this email directly, view it on GitHub https://github.com/hiddenSymmetries/simsopt/pull/412#pullrequestreview-2058358676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA62VEGGDKTEHQ3JQCJCYNTZCN5GBAVCNFSM6AAAAABHEHTYYOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDANJYGM2TQNRXGY . You are receiving this because your review was requested.Message ID: @.***>

mbkumar avatar May 15 '24 15:05 mbkumar

Btw the Docker file we are using is ghcr.io/itpplasma/devel-tex based on Debian 12.

krystophny avatar May 15 '24 18:05 krystophny

@mbkumar @andrewgiuliani can you quickly check? This is such a small change that we shouldn't spend more weeks on it.

krystophny avatar Jul 10 '24 18:07 krystophny

Thanks! I updated the branch - I think the problem with the CI/CD is because the external fork has no password for the docker registry.

krystophny avatar Jul 11 '24 06:07 krystophny

Thanks a lot!

krystophny avatar Jul 14 '24 13:07 krystophny