Skip to content

Mac OS X Build#221

Merged
abhyshr merged 30 commits intodevelopfrom
fix/mac-build
Jan 29, 2025
Merged

Mac OS X Build#221
abhyshr merged 30 commits intodevelopfrom
fix/mac-build

Conversation

@wperkins
Copy link
Copy Markdown
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
Comment thread install_gridpack_deps.sh Outdated
rm -rf petsc

# Download
echo "Downloading PETSc 3.16.4"
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread install_gridpack_deps.sh Outdated

cd petsc

git checkout tags/v3.16.4 -b v3.16.4
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread install_gridpack_deps.sh Outdated
echo "Installing PETSc $petsc_version"

./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
Copy Markdown
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
Copy Markdown
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.

$common_flags ..

elif [ $host == "we32673" ]; then
elif [ $host == "WE39945" ]; then
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@abhyshr
Copy link
Copy Markdown
Collaborator

abhyshr commented Jan 23, 2025

Is this good to merge? If so, I can do it.

@wperkins
Copy link
Copy Markdown
Member Author

Is this good to merge? If so, I can do it.

Please look at #226 first, because the current develop make is broken for me

@wperkins
Copy link
Copy Markdown
Member Author

There are also minor changes to the EMT module and application to get it to build on my Mac.

@abhyshr abhyshr merged commit bd6fb5c into develop Jan 29, 2025
@wperkins wperkins deleted the fix/mac-build branch February 4, 2025 22:34
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