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 OS X Build #221

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open

Mac OS X Build #221

wants to merge 24 commits into from

Conversation

wperkins
Copy link
Member

@wperkins wperkins commented Dec 10, 2024

This PR provides changes necessary to build GridPACK on Mac OS X, particularly with shared libraries and the Python interface. This resolves #217 (mostly) in order to build with modern CLang compilers. Probably resolves #197 too.

@wperkins wperkins added this to the GridPACK 3.5 Release milestone Dec 10, 2024
@wperkins wperkins requested a review from abhyshr December 10, 2024 15:58
@wperkins wperkins self-assigned this Dec 10, 2024
# Download
echo "Downloading PETSc 3.16.4"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to move this upto 3.20. I believe for emt-alpha branch I am using 3.20.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You show the original script code here. The updated script uses 3.20.6, but 3.21.4 also worked for me. It is much easier to change the version in the updated script.


git clone https://gitlab.com/petsc/petsc.git

cd petsc

git checkout tags/v3.16.4 -b v3.16.4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to 3.20

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are showing the original script. See comment above.


./configure --download-superlu_dist --download-metis --download-parmetis --download-suitesparse --download-f2cblaslapack --download-cmake --prefix=${PWD}/install_for_gridpack --scalar-type=complex --with-shared-libraries=1 --download-f2cblaslapack=1
./configure --with-gnu-compilers=0 --download-superlu_dist --download-metis --download-parmetis --download-suitesparse --download-f2cblaslapack --download-cmake=0 --prefix=${PWD}/install_for_gridpack --scalar-type=complex --download-sowing --download-f2cblaslapack $petscopts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Why NO GNU compilers?
  • Scalar type should be real
  • Also add --download-scalapack --download-mumps

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Why NO GNU compilers?

I should be able to remove this. Some part of PETSc was choosing the wrong GFortran. I tried to use that option to resolve. It turned out to be unnecessary.

* Scalar type should be real

OK, but this was not the case in develop when I started this branch.

* Also add `--download-scalapack --download-mumps`

Agreed, but these were not the script from develop when I started this branch.

I can do the latter two here, but this will mean a conflicts whenever the EMT stuff is merged.

@@ -104,51 +104,39 @@ if [ $host == "briareus" ]; then
-D CMAKE_INSTALL_PREFIX:PATH="$prefix" \
$common_flags ..

elif [ $host == "we32673" ]; then
elif [ $host == "WE39945" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What host is this?

Copy link
Member Author

@wperkins wperkins Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is my MacBook. It used to be my Mac Pro, but I don't have that anymore.

@abhyshr
Copy link
Collaborator

abhyshr commented Dec 11, 2024

Looks good. Have suggested some minor things.

Can GridPACK python libraries be built with this change on Mac?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhyshr, I wrote up some notes on how I did the build on my MacBook. Take a look, and see if it's useful.

@wperkins wperkins marked this pull request as ready for review December 18, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove/replace outdated C++ constructs Python module: Ubuntu 23.x build
2 participants