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

Setting up team's Mac mini #1242

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
60daa63
update mac tpl install versions and spack yaml
chapman39 Oct 4, 2024
52ea5d3
update note about devtools, remove section about petsc (since built b…
chapman39 Oct 4, 2024
483eb26
Merge remote-tracking branch 'origin/develop' into task/chapman39/mac…
chapman39 Oct 10, 2024
f1d2b5d
separate /usr and brew pkgs, mention python venv in docs
chapman39 Oct 11, 2024
4becb06
Merge remote-tracking branch 'origin/develop' into task/chapman39/mac…
chapman39 Oct 31, 2024
cfa0b57
Remove failing BC DirectTrueDofs test
chapman39 Oct 31, 2024
b0069dc
docs clarifications and syntax cleanup
chapman39 Oct 31, 2024
a4f4650
ci mac cron job script init
chapman39 Nov 8, 2024
441eab1
add quotes
chapman39 Nov 15, 2024
8a823ce
clear previous builds before running new ci job
chapman39 Nov 15, 2024
788dd15
add to output
chapman39 Nov 15, 2024
7d94517
Merge branch 'develop' into task/chapman39/macmini-build
chapman39 Dec 2, 2024
8b039b7
update environment
chapman39 Dec 5, 2024
0b90a5a
Merge branch 'task/chapman39/macmini-build' of github.com:LLNL/serac …
chapman39 Dec 5, 2024
ed4c122
rm python prefix
chapman39 Dec 5, 2024
2e815a6
python3
chapman39 Dec 5, 2024
850dfbf
Merge remote-tracking branch 'origin/develop' into task/chapman39/mac…
chapman39 Dec 5, 2024
029ca7a
create page explaining how to add a new user to shared mac mini
chapman39 Dec 6, 2024
fc2de66
Merge branch 'task/chapman39/macmini-build' of github.com:LLNL/serac …
chapman39 Dec 6, 2024
6c32386
fix docs
chapman39 Dec 6, 2024
662758f
fix links
chapman39 Dec 6, 2024
787d167
Merge branch 'develop' into task/chapman39/macmini-build
chapman39 Dec 6, 2024
5733e10
Update src/docs/sphinx/dev_guide/macmini.rst
chapman39 Dec 18, 2024
18edf99
provide cron example
chapman39 Dec 18, 2024
1b550be
Merge branch 'task/chapman39/macmini-build' of github.com:LLNL/serac …
chapman39 Dec 18, 2024
afb5dc1
syntax
chapman39 Dec 18, 2024
33d0119
Merge branch 'develop' into task/chapman39/macmini-build
chapman39 Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions scripts/shared-macmini/build-and-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Build and test Serac on team's shared MacMini, then report results to a set of emails

# Update environment
source ~/.bash_profile

# Variables
CI_ROOT_DIR="/Users/chapman39/dev/serac/ci"
PROJECT_DIR="$CI_ROOT_DIR/repo"
OUTPUT_LOG="$CI_ROOT_DIR/logs/macmini-build-and-test-$(date +"%Y_%m_%d_%H_%M_%S").log"
HOST_CONFIG="$CI_ROOT_DIR/host-configs/[email protected]"
RECIPIENTS="[email protected],[email protected],[email protected]"

# Go to project directory
cd $PROJECT_DIR

# Update Serac
git checkout task/chapman39/macmini-build >> $OUTPUT_LOG 2>&1 # TODO CHANGE TO DEVELOP
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to self to change this before merging

git pull >> $OUTPUT_LOG 2>&1
git submodule update --init --recursive >> $OUTPUT_LOG 2>&1

# Clear previous build(s)
rm -rfv _serac_build_and_test* >> $OUTPUT_LOG 2>&1

# Build and test Serac
python3 ./scripts/llnl/build_src.py --host-config $HOST_CONFIG -v -j16 >> $OUTPUT_LOG 2>&1

# Email variables
if [ $? -eq 0 ]; then
EMAIL_SUBJECT="Serac Succeeded!"
else
EMAIL_SUBJECT="Serac Failed!"
fi
EMAIL_SUBJECT="$EMAIL_SUBJECT MacMini build and test report $(date)"
EMAIL_BODY="This is automatic weekly report of Serac's MacMini build. See attached for log."

# Send report via email
echo "$EMAIL_BODY" | mutt -a "$OUTPUT_LOG" -s "$EMAIL_SUBJECT" -- "$RECIPIENTS"
186 changes: 139 additions & 47 deletions scripts/spack/configs/macos_sonoma_aarch64/spack.yaml
Original file line number Diff line number Diff line change
@@ -1,129 +1,221 @@

spack:
# add package specs to the `specs` list
view: true
concretizer:
unify: true
view: false

compilers::
- compiler:
spec: clang@=14.0.6
paths:
cc: /opt/homebrew/opt/llvm@14/bin/clang
cxx: /opt/homebrew/opt/llvm@14/bin/clang++
f77: /opt/homebrew/bin/gfortran-14
fc: /opt/homebrew/bin/gfortran-14
flags: {}
operating_system: sonoma
target: aarch64
modules: []
environment: {}
extra_rpaths:
- /opt/homebrew/lib/gcc/14

packages:
all:
compiler: [clang, gcc]
providers:
blas: [netlib-lapack]
blas: [openblas]
lapack: [netlib-lapack]
mpi: [openmpi]
zlib-api: [zlib]

# Providers
mpi:
buildable: false
openmpi:
buildable: false
externals:
- spec: [email protected]_1
prefix: /opt/homebrew
openblas:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
netlib-lapack:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew/opt/lapack
autoconf:
zlib-ng:
buildable: false
externals:
- spec: [email protected]
- spec: [email protected]
prefix: /opt/homebrew

# External packages from Homebrew
automake:
buildable: false
externals:
- spec: automake@1.16.5
- spec: automake@1.17
prefix: /opt/homebrew
bzip2:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew/opt/bzip2
cmake:
version: [3.29.6]
version: [3.30.4]
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
diffutils:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
expat:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
fmt:
buildable: false
externals:
- spec: [email protected]
- spec: [email protected]
prefix: /opt/homebrew
gettext:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
gnuconfig:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
graphviz:
buildable: false
externals:
- spec: graphviz@11.0.0
- spec: graphviz@12.1.12
prefix: /opt/homebrew
libtool:
buildable: false
externals:
- spec: libtool@2.4.7
- spec: libtool@2.5.3
prefix: /opt/homebrew
libx11:
buildable: false
externals:
- spec: [email protected].9
- spec: [email protected].10
prefix: /opt/homebrew
llvm:
version: [18.1.8]
lua:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew/opt/llvm
- spec: [email protected]
prefix: /opt/homebrew
m4:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew/opt/m4
perl:
ninja:
buildable: false
externals:
- spec: [email protected]~cpanm+opcode+open+shared+threads
prefix: /usr
- spec: [email protected]
prefix: /opt/homebrew
openssh:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
pkg-config:
buildable: false
externals:
- spec: [email protected]_3
prefix: /opt/homebrew
pkgconf:
buildable: false
externals:
- spec: [email protected]_3
prefix: /opt/homebrew
readline:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
sqlite:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
xz:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew

# External packages in /usr
curl:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
git:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
gmake:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
perl:
buildable: false
externals:
- spec: [email protected]~cpanm+opcode+open+shared+threads
prefix: /usr
python:
buildable: false
externals:
- spec: python@3.12.4+bz2+crypt+ctypes+dbm+lzma+nis+pyexpat~pythoncmd+readline+sqlite3+ssl~tkinter+uuid+zlib
prefix: /opt/homebrew/opt/python
- spec: python@3.9
prefix: /usr
tar:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
readline:
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
unzip:
buildable: false
externals:
- spec: [email protected]
prefix: /usr
zlib:

# Devtools (optional)
cppcheck:
version: [2.15.0]
buildable: false
externals:
- spec: [email protected]
- spec: [email protected]
prefix: /opt/homebrew

# The "::" removes all found/known compilers from Spack except for these.
compilers::
- compiler:
spec: clang@=18.1.8
paths:
cc: /opt/homebrew/opt/llvm/bin/clang
cxx: /opt/homebrew/opt/llvm/bin/clang++
f77: /opt/homebrew/bin/gfortran-14
fc: /opt/homebrew/bin/gfortran-14
flags: {}
operating_system: sonoma
target: aarch64
modules: []
environment: {}
extra_rpaths:
- /opt/homebrew/lib/gcc/14
doxygen:
version: [1.12.0]
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew
llvm:
version: [14.0.6]
buildable: false
externals:
- spec: [email protected]
prefix: /opt/homebrew/opt/llvm@14
py-sphinx:
buildable: false
externals:
- spec: [email protected]
prefix: /Users/chapman39/dev/serac/venv
py-ats:
buildable: false
externals:
- spec: [email protected]
prefix: /Users/chapman39/dev/serac/venv
1 change: 1 addition & 0 deletions src/docs/sphinx/dev_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Developer Guide
codevelop
state_manager
equation_solver
macmini

Developing a New Physics Module
-------------------------------
Expand Down
50 changes: 50 additions & 0 deletions src/docs/sphinx/dev_guide/macmini.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
.. ## Copyright (c) 2019-2024, Lawrence Livermore National Security, LLC and
.. ## other Serac Project Developers. See the top-level COPYRIGHT file for details.
.. ##
.. ## SPDX-License-Identifier: (BSD-3-Clause)

.. _macmini-label:

==========================================
Adding an Additional User to Serac MacMini
==========================================

This page assumes you are a Serac developer who requires access to the team's shared MacMini. This machine
tests Serac Mac builds on a regular basis via cron. If you have any questions, reach out to either
`Brandon Talamini <[email protected]>`_, `Alex Chapman <[email protected]>`_, or LivIT. The following
are steps to guide you to gaining access on the machine to the point you're able to build Serac.

1. **Add User**

Without a MyPass, you can still log in using your LLNL username and AD password. Do this first to setup an account on the machine.
You won't be able to do much, since you do not have access to FileVault, and you are not an admin... yet.

2. **MyPass**

Then, acquire a new MyPass with a USB-C port dedicated to this machine. This will grant you access to FileVault.
Contact LivIT directly to setup an appointment and request one.

3. **EARS Admin Request**

Next, request admin access to the machine by visiting either ServiceNow or the `EARS website <https://ears.llnl.gov/dashboard>`_.

4. **Two Logins**

Once you have a MyPass and you have admin rights, try to log in again. There should be two passwords required to log in. The first one
is for your MyPass (assuming it's connected to the machine) and the other is for the account login.
chapman39 marked this conversation as resolved.
Show resolved Hide resolved

5. **Download and setup Brew**

Visit `Brew's website <https://brew.sh/>`_ to install and setup Brew. This is required to install some of Serac's third-party libraries
(TPLs).

6. **Add New SSH Key to GitHub**

Next step setting up a new SSH Key to your GitHub account so that you're able to clone the Serac repo. In case you do not know
how to do this, instructions can be found on
`GitHub's website <https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account>_`

7. **Install Serac**

You're now able to clone Serac and get started with the installation process. Further instructions for doing so are currently on
the `quickstart page <https://serac.readthedocs.io/en/latest/sphinx/quickstart.html#quickstart-label>`_` of the Serac documentation.
Loading