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

Mac build #46

Merged
merged 78 commits into from
Jul 18, 2024
Merged

Mac build #46

merged 78 commits into from
Jul 18, 2024

Conversation

suzanmanasreh
Copy link
Contributor

@suzanmanasreh suzanmanasreh commented Jul 9, 2024

  • MacOS Runner
  • Upgrade to latest PETSc version
  • Mini case with 2 cells and less wall points
  • Fixed miscellaneous compiler errors and warnings in codebase (there are more i didn't fix but they probably should be in the future)
  • Readme only describes mac build (ubuntu in the future if I get access to an ubuntu computer?)
    • @sbryngelson I think I need help explaining things better in the readme and accounting for install failure cases, but I tried my best.
  • Need to wait for next NetCDF-Fortran release to install it properly on mac, but I found a hack around it. I don't fully trust it though.

Known bugs that I have no fixes for:

  • The call PetscFinalize(ierr) line in the FinalizeMPI subroutine will cause the program (initcond.F90) to freeze if you're connected to the gatech VPN
    • also can't successfully configure petsc while connected to vpn
  • can't configure petsc if conda activated in your shell
  • mpiexec generates random copies of initcond that you have to delete yourself or else cmake fails

@suzanmanasreh
Copy link
Contributor Author

suzanmanasreh commented Jul 15, 2024

I would clean this up and open a PR, but I tried my ./rbc.sh install-mac on another mac, and I'm getting a link error on petsc make all. I had to use the same flag inside my CMakeLists.txt, so this issue has to be resolved. @sbryngelson have you tried it in you environment?

CLINKER arch-darwin-c-opt/lib/libpetsc.3.21.3.dylib
ld: unknown option: -no_warn_duplicate_libraries
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@sbryngelson
Copy link
Member

This worked on my machine. The reason it didn't work here is that it is using clang, not gcc. if you export CC=gcc-13 export CXX=g++-13 export FC=gfortran-13 (or replace 13 with 12 or 14, whatever your version is), it should work.

@suzanmanasreh
Copy link
Contributor Author

hm that's weird because i'm pretty sure it has to be using mpicc, mpicxx, and mpif90 with the ./configure options

@sbryngelson
Copy link
Member

mpicc/cxx can point to an underlying clang compiler, they are just interfaces between the underlying compiler and mpi api.

@suzanmanasreh
Copy link
Contributor Author

o makes sense. it also seems to work a lot better with brew installed mpich than openmpi for me

@suzanmanasreh suzanmanasreh changed the title Mock PR to test runner Mac build Jul 17, 2024
@suzanmanasreh suzanmanasreh marked this pull request as ready for review July 17, 2024 21:17
@suzanmanasreh suzanmanasreh linked an issue Jul 17, 2024 that may be closed by this pull request
@sbryngelson sbryngelson merged commit 9f04c0f into comp-physics:master Jul 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

readme describes installation on a specific computer
2 participants