CambridgeNuclear / SCONE

Stochastic Calculator Of Neutron transport Equation
https://scone.readthedocs.io
Other
36 stars 22 forks source link

Installation Mac #31

Open aliciadrm opened 1 year ago

aliciadrm commented 1 year ago

Hi I am trying to install SCONE on my macOS 13 and when running the automated tests I have failures in the plane_test_suite.testHalfspace and in the plane_test_suite.testDistance. My compiler is GNU Fortran (GCC) 12.2.0.

If you have any insights or advice on how to proceed, please let me know.

Thanks

ChasingNeutrons commented 1 year ago

Hi @aliciadrm,

I have seen something like this before when using -march=native in the compiler options. Is the error similar for you: there's a failure in a distance calculation? It should be returning a very large number which isn't quite equal to the INFINITY value we set in the SharedModules/universalVariables.f90 file. If so, you can proceed relatively safely for now. While we should hunt down what's going on, one thing may be to try a slightly older gfortran version. I am usually using 9.4.0, but I am sure we have successfully past all tests with more recent versions too.

Paul

thltsui commented 1 year ago

Hi, I am trying to install SCONE on an Apple M2 Max (M2 chip) with macOS 13.5.2.

When I first tried to install according to step 5 under Compiling SCONE under https://scone.readthedocs.io/en/latest/Installation.html, I received an error message that tells me to turn LTO off. Then, I tried to run cmake -E chdir ./Build cmake ./.. -DLTO=OFF, but again, the installation got stuck. I re-ran the code again and got the following messages:

-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) -- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) -- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND) (found version "4.5") -- /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/Accelerate.framework-lm-ldl -- -- ><((((> ><((((> ><((((> ><((((> ><((((> ><((((> -- SCONE CONFIGURATION SUMMARY -- Unit Tests: OFF -- Link-time optimisation: OFF -- Code coverage logging: OFF -- Extra runtime debug checks: OFF -- OpenMP parallelism: ON -- Fortran compiler: /opt/homebrew/bin/gfortran -- Compiler version: 13.2.0 -- OpenMP version:
-- Global Fortran flags: -std=f2008 -O3 -g -pedantic -Wall -Wno-unused-dummy-argument -cpp -fopenmp -- SCONE library flags:
-- <))))>< <))))>< <))))>< <))))>< <))))>< <))))>< -- -- Configuring done (0.5s) -- Generating done (0.1s) -- Build files have been written to: /Users/u2272595/SCONE/Build

Upon turning all of the configurations off (including OpenMP parallelism), I now managed to run make -C Build successfully.

However, when I run ./Build/unitTests,

It gives

Time: 0.084 seconds

Failure in: plane_test_suite.testHalfspace Location: [plane_test.f90:131]

Failure in: plane_test_suite.testDistance Location: [plane_test.f90:179] expected +0.9223372E+19 but found: +0.1297694E+18; difference: |+0.9093603E+19| > tolerance:+0.000000.

FAILURES!!! Tests run: 318, Failures: 2, Errors: 0 Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO IEEE_OVERFLOW_FLAG ERROR STOP Encountered 1 or more failures/errors during testing.

Error termination. Backtrace:

0 0x105755b07

1 0x1057566a7

2 0x1057578a7

3 0x1050dc6e3

4 0x104378403

5 0x10517644f

Furthermore, when I run ./Build/integrationTests, It simply says zsh: no such file or directory: ./Build/integrationTests.

NRavoisin96 commented 1 month ago

Unless anyone has any objections, I will have a look into this. I own a Mac and I know some of the PhD / MPhil students usually do as well. In any case, it would be beneficial to get unit tests to pass on MacOS without the need to install virtual machines.

valeriaRaffuzzi commented 1 month ago

Unless anyone has any objections, I will have a look into this. I own a Mac and I know some of the PhD / MPhil students usually do as well. In any case, it would be beneficial to get unit tests to pass on MacOS without the need to install virtual machines.

Sounds good, go for it! It's about time we get this sorted!

NRavoisin96 commented 3 weeks ago

Resolved, awaiting pull request #139 approval.