Skip to content

Commit ca43374

Browse files
committed
Merge remote-tracking branch 'origin/main' into nix
2 parents 347554e + 9e5345c commit ca43374

File tree

8 files changed

+50
-34
lines changed

8 files changed

+50
-34
lines changed

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ CODE is based around our standard Debian bookworm system at ITPcp and provides
1616

1717
## Getting Started
1818

19-
If you haven't done so earlier, set up your SSH keys in `~/.ssh` via `ssh-keygen` and
20-
add the content of `id_rsa.pub` to Gitlab and GitHub for authentication.
19+
If you haven't done so earlier, set up your SSH keys in `~/.ssh` via `ssh-keygen`
20+
with a **blank passphrase** and add the content of `id_rsa.pub` to Gitlab and GitHub
21+
for authentication.
2122

2223
### Perparing your machine
2324

@@ -47,14 +48,20 @@ Run the setup script manually with
4748

4849
scripts/setup.sh
4950

50-
The setup will install external dependencies and create and activate
51+
The setup will install external dependencies and create
5152
a Python virtual environment in the hidden `.venv` directory.
5253

53-
If you work outside a container, also manually run
54+
Finally, activate the environment with
55+
56+
source activate.sh
5457

55-
source /path/to/code/activate.sh
58+
To use this environment as a standard, edit your bashrc with
5659

57-
and put this line in your bashrc.
60+
code ~/.bashrc
61+
62+
and put as a last line
63+
64+
source <path to your code copy>/activate.sh
5865

5966

6067
## Testing

modules/mars/2022

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module-whatis "MARS (2022)"
44

5-
prereq nvhpc/24.5
5+
prereq nvhpc/24.1
66

77
setenv MARSHOME $env(CODE)/external/MARS/MarsQ_2022
88
prepend-path PATH $env(MARSHOME)

scripts/setup/debian.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
#!/bin/bash
2+
set -e
23

3-
# Enable non-free packages
4-
sudo sed -i -e's/ main$/ main contrib non-free non-free-firmware/g' \
5-
/etc/apt/sources.list.d/debian.sources
6-
sudo sed -i -e's/ main$/ main contrib non-free non-free-firmware/g' \
7-
/etc/apt/sources.list
4+
# src: https://stackoverflow.com/a/246128/16527499
5+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
86

9-
sudo apt-get update -y && apt-get upgrade -y -q --no-install-recommends
7+
sudo apt-get update -y && sudo apt-get upgrade -y -q --no-install-recommends
108

11-
sudo $CODE/scripts/setup/debian/base.sh
12-
sudo $CODE/scripts/setup/debian/interactive.sh
13-
sudo $CODE/scripts/setup/debian/libs.sh
14-
sudo $CODE/scripts/setup/debian/octave.sh
15-
sudo $CODE/scripts/setup/debian/texlive.sh
16-
sudo $CODE/scripts/setup/debian/fonts.sh
9+
sudo $SCRIPT_DIR/debian/base.sh
10+
sudo $SCRIPT_DIR/debian/interactive.sh
11+
sudo $SCRIPT_DIR/debian/libs.sh
12+
sudo $SCRIPT_DIR/debian/octave.sh
13+
sudo $SCRIPT_DIR/debian/texlive.sh
14+
sudo $SCRIPT_DIR/debian/fonts.sh

scripts/setup/debian/base.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ apt-get install -y -q --no-install-recommends \
2525
python3-dev \
2626
python3-pip \
2727
python3-venv \
28-
nix-bin
28+
nix-bin \
29+
bash \
30+
csh

scripts/setup/debian/libs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ apt-get install -y -q --no-install-recommends \
2323
libparmetis-dev \
2424
libscotch-dev \
2525
libzstd-dev \
26-
cppzmq-dev \
26+
libgmp-dev \
27+
libmpfr-dev \
2728
uuid-dev \
2829
petsc-dev \
2930
slepc-dev \

scripts/setup/kamel.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,7 @@ cd slatec
66
mkdir lib
77
curl -L https://www.netlib.org/slatec/slatec_src.tgz -o - | tar xz
88

9-
# Check the operating system
10-
if [[ "$(uname)" == "Darwin" ]]; then
11-
# macOS specific compiler flags
12-
CFLAGS="-O2"
13-
elif [[ "$(uname)" == "Linux" ]]; then
14-
# Linux specific compiler flags
15-
CFLAGS="-msse2 -mfpmath=sse"
16-
else
17-
# Default compiler flags for other operating systems
18-
CFLAGS=""
19-
fi
9+
CFLAGS="-O2"
2010
gfortran -c -Wall -Wtabs -mtune=generic $CFLAGS src/*.f
2111
ar rcs libslatec.a *.o
2212
rm *.o
@@ -27,7 +17,7 @@ echo ""
2717
echo "Building Sundials..."
2818
cd ..
2919
git clone [email protected]:LLNL/sundials.git
30-
cd sundials
20+
cd sundials
3121
git checkout v5.7.0
3222
mkdir build
3323
cd build

scripts/setup/lazygit.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
install_lazygit() {
4+
if ! command -v lazygit &>/dev/null; then
5+
echo installing Lazygit...
6+
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*')
7+
curl -Lo lazygit.tar.gz --output-dir /tmp "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
8+
tar -xf /tmp/lazygit.tar.gz -C /tmp lazygit
9+
mkdir -p $HOME/.local/bin
10+
install /tmp/lazygit $HOME/.local/bin
11+
rm /tmp/lazygit*
12+
echo Lazygit installed
13+
else
14+
echo Lazygit already installed
15+
fi
16+
}
17+
18+
install_lazygit

scripts/setup/mars.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
set -e
4-
module load nvhpc/24.5
4+
module load nvhpc/24.1
55
git clone [email protected]:plasma/codes/mars.git MARS
66
cd MARS/MarsQ_2022
77
make

0 commit comments

Comments
 (0)