Skip to content

Commit 2d1de77

Browse files
authored
Remove deprecated build hacks. Includes move to CCE18 (Frontier) (#620)
1 parent 32b764e commit 2d1de77

File tree

23 files changed

+95
-466
lines changed

23 files changed

+95
-466
lines changed

.github/workflows/docker.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
. ./mfc.sh load -c f -m g
4-
./mfc.sh build -j 8 --gpu --sys-hdf5 --sys-fftw
4+
./mfc.sh build -j 8 --gpu

.github/workflows/frontier/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
gpus=`rocm-smi --showid | awk '{print $1}' | grep -Eo '[0-9]+' | uniq | tr '\n' ' '`
44
ngpus=`echo "$gpus" | tr -d '[:space:]' | wc -c`
55

6-
./mfc.sh test --max-attempts 3 -j $ngpus --sys-hdf5 --sys-fftw -- -c frontier
6+
./mfc.sh test --max-attempts 3 -j $ngpus -- -c frontier
77

.github/workflows/test.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -48,23 +48,17 @@ jobs:
4848

4949
- name: Setup MacOS
5050
if: matrix.os == 'macos'
51-
run: |
52-
brew install wget make python make cmake coreutils gcc@14
53-
echo "CC=gcc-14" >> $GITHUB_ENV
54-
echo "CXX=g++-14" >> $GITHUB_ENV
51+
run: |
52+
brew install coreutils python cmake fftw hdf5 gcc@14 open-mpi
5553
echo "FC=gfortran-14" >> $GITHUB_ENV
56-
57-
- name: (MacOS) Build OpenMPI
58-
if: matrix.os == 'macos' && matrix.mpi == 'mpi'
59-
run: |
60-
brew install mpich
6154
6255
- name: Setup Ubuntu
6356
if: matrix.os == 'ubuntu' && matrix.intel == false
6457
run: |
6558
sudo apt update -y
66-
sudo apt install -y tar wget make cmake gcc g++ python3 python3-dev "openmpi-*" libopenmpi-dev
67-
59+
sudo apt install -y cmake gcc g++ python3 python3-dev hdf5-tools \
60+
libfftw3-dev libhdf5-dev openmpi-bin libopenmpi-dev
61+
6862
- name: Setup Ubuntu (Intel)
6963
if: matrix.os == 'ubuntu' && matrix.intel == true
7064
run: |
@@ -83,34 +77,22 @@ jobs:
8377
echo "OMPI_FC=$(which ifort)" >> $GITHUB_ENV
8478
echo "OMPI_CXX=$(which icpc)" >> $GITHUB_ENV
8579
echo "OMPI_MPICC=$(which icc)" >> $GITHUB_ENV
86-
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
87-
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
80+
echo "MPI_HOME=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
81+
echo "I_MPI_ROOT=/opt/intel/oneapi/mpi/2021.7.1/" >> $GITHUB_ENV
8882
8983
- name: Build
9084
run: |
91-
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
85+
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
9286
/bin/bash mfc.sh build -j $(nproc) --${{ matrix.debug }} --${{ matrix.mpi }}
9387
9488
- name: Test
9589
run: |
96-
if [ '${{ matrix.intel }}' == 'true' ]; then source /opt/intel/oneapi/setvars.sh; fi
90+
if [ '${{ matrix.intel }}' == 'true' ]; then . /opt/intel/oneapi/setvars.sh; fi
9791
/bin/bash mfc.sh test --max-attempts 3 -j $(nproc) $OPT1 $OPT2
9892
env:
9993
OPT1: ${{ matrix.mpi == 'mpi' && '--test-all' || '' }}
10094
OPT2: ${{ matrix.debug == 'debug' && '-% 20' || '' }}
10195

102-
docker:
103-
name: Github | Docker
104-
if: needs.file-changes.outputs.checkall == 'true'
105-
needs: file-changes
106-
runs-on: ubuntu-latest
107-
steps:
108-
- name: Clone
109-
uses: actions/checkout@v4
110-
111-
- name: Test
112-
run: sudo ./mfc.sh docker ./mfc.sh test --max-attempts 3 -j $(nproc) -a
113-
11496
self:
11597
name: Self Hosted
11698
if: github.repository == 'MFlowCode/MFC' && needs.file-changes.outputs.checkall == 'true'

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
node_modules/
22
package.json
33
yarn.lock
4-
docker-compose.yml
54

65
.venv/
76
/build/

CMakeLists.txt

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ find_program(FYPP_EXE fypp REQUIRED)
8989

9090
link_libraries("${CMAKE_DL_LIBS}")
9191
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
92-
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake")
92+
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake/regular")
93+
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray")
94+
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake/cce")
95+
endif()
9396

9497

9598
# Compiler Flags: Here, we specify our own compiler flags for both release and
@@ -526,15 +529,6 @@ if (MFC_SIMULATION)
526529
MFC_SETUP_TARGET(TARGET simulation
527530
SOURCES "${simulation_SRCs}"
528531
MPI OpenACC FFTW)
529-
530-
if (CMAKE_Fortran_COMPILER_ID STREQUAL "Cray" AND MFC_OpenACC)
531-
add_custom_command(TARGET simulation POST_BUILD
532-
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cce_simulation_workgroup_256.sh"
533-
"${CMAKE_CURRENT_BINARY_DIR}"
534-
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
535-
COMMENT "Patching & Rebuilding with Cray hacks"
536-
)
537-
endif()
538532
endif()
539533

540534
if (MFC_POST_PROCESS)

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,14 @@ It's rather straightforward.
5858
We'll give a brief intro. here for MacOS.
5959
Using [brew](https://brew.sh), install MFC's dependencies:
6060
```shell
61-
brew install wget python cmake gcc@14 mpich
61+
brew install coreutils python cmake fftw hdf5 gcc open-mpi
6262
```
6363
You're now ready to build and test MFC!
6464
Put it to a convenient directory via
6565
```shell
6666
git clone https://github.com/MFlowCode/MFC
6767
cd MFC
6868
```
69-
and be sure MFC knows what compilers to use by appending and sourcing your `~/.profile` file via this command
70-
```shell
71-
echo -e "export CC=gcc-14 \nexport CXX=g++-14 \nexport FC=gfortran-14" >> ~/.profile
72-
source ~/.profile
73-
```
7469
then you can build MFC and run the test suite!
7570
```shell
7671
./mfc.sh build -j $(nproc)

docs/documentation/getting-started.md

Lines changed: 8 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,10 @@ Please select your desired configuration from the list bellow:
2828
```shell
2929
sudo apt update
3030
sudo apt upgrade
31-
sudo apt install tar wget make cmake gcc g++ \
32-
python3 python3-dev \
33-
"openmpi-*" libopenmpi-dev \
34-
python3-venv
35-
```
36-
37-
- **Via Pacman (Arch):**
38-
39-
```shell
40-
sudo pacman -Syu
41-
sudo pacman -S base-devel coreutils \
42-
git ninja gcc-fortran \
43-
cmake openmpi python3 \
44-
python-pip openssh \
45-
python-virtualenv vim \
46-
wget tree
31+
sudo apt install tar wget make cmake gcc g++ \
32+
python3 python3-dev python3-venv \
33+
openmpi-bin libopenmpi-dev \
34+
libhdf5-dev libfftw3-dev
4735
```
4836

4937
If you wish to build MFC using [NVidia's NVHPC SDK](https://developer.nvidia.com/hpc-sdk),
@@ -55,8 +43,8 @@ first follow the instructions [here](https://developer.nvidia.com/nvidia-hpc-sdk
5543
<summary><h2>Windows</h2></summary>
5644

5745
On Windows, you can either use Intel Compilers with the standard Microsoft toolchain,
58-
[Docker](https://docs.docker.com/get-docker/) or the
59-
[Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/) for a Linux experience.
46+
or the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/)
47+
for a Linux experience.
6048

6149
<details>
6250

@@ -113,82 +101,16 @@ You will also have access to the `.sln` Microsoft Visual Studio solution files f
113101
<details>
114102
<summary><h3>MacOS</h3></summary>
115103

116-
- **If you use [ZSH]** (Verify with `echo $SHELL`)
104+
Using [Homebrew](https://brew.sh/) you can install the necessary dependencies:
117105

118106
```shell
119-
touch ~/.zshrc
120-
open ~/.zshrc
121-
```
122-
123-
- **If you use [BASH]** (Verify with `echo $SHELL`)
124-
125-
```shell
126-
touch ~/.bash_profile
127-
open ~/.bash_profile
128-
```
129-
130-
An editor should open.
131-
Please paste the following lines into it before saving the file.
132-
Modify the first assignment if you wish to use a different version of GNU's GCC.
133-
These lines ensure that LLVM's Clang and Apple's modified version of GCC are not used to compile MFC.
134-
Further reading on `open-mpi` incompatibility with `clang`-based `gcc` on macOS: [here](https://stackoverflow.com/questions/27930481/how-to-build-openmpi-with-homebrew-and-gcc-4-9).
135-
We do *not* support `clang` due to conflicts with the Silo dependency.
136-
137-
```shell
138-
export MFC_GCC_VER=13
139-
export CC=gcc-$MFC_GCC_VER
140-
export CXX=g++-$MFC_GCC_VER
141-
export FC=gfortran-$MFC_GCC_VER
142-
```
143-
144-
**Close the open editor and terminal window**. Open a **new terminal** window before executing the commands below.
145-
146-
```shell
147-
brew install wget python cmake gcc@$MFC_GCC_VER mpich
107+
brew install coreutils python cmake fftw hdf5 gcc open-mpi
148108
```
149109

150110
They will download the dependencies MFC requires to build itself.
151111

152112
</details>
153113

154-
<details>
155-
<summary><h3>Docker</h3></summary>
156-
157-
Docker is a lightweight, cross-platform, and performant alternative to Virtual Machines (VMs).
158-
We build a Docker Image that contains the packages required to build and run MFC on your local machine.
159-
160-
First, install Docker and Git:
161-
- Windows: [Docker](https://docs.docker.com/get-docker/) + [Git](https://git-scm.com/downloads).
162-
- macOS: `brew install git docker` (requires [Homebrew](https://brew.sh/)).
163-
- Other systems:
164-
```shell
165-
sudo apt install git docker # Debian / Ubuntu via Aptitude
166-
sudo pacman -S git docker # Arch Linux via Pacman
167-
```
168-
169-
Once Docker and Git are installed on your system, clone MFC with
170-
171-
```shell
172-
git clone https://github.com/MFlowCode/MFC
173-
cd MFC
174-
```
175-
176-
To fetch the prebuilt Docker image and enter an interactive bash session with the
177-
recommended settings applied, run
178-
179-
```shell
180-
./mfc.sh docker # If on \*nix/macOS
181-
.\mfc.bat docker # If on Windows
182-
```
183-
184-
We automatically mount and configure the proper permissions for you to access your local copy of MFC, available at `~/MFC`.
185-
You will be logged in as the `me` user with root permissions.
186-
187-
:warning: The state of your container is entirely transient, except for the MFC mount.
188-
Thus, any modification outside of `~/MFC` should be considered permanently lost upon session exit.
189-
190-
</details>
191-
192114
## Building MFC
193115

194116
MFC can be built with support for various (compile-time) features:

mfc.bat

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@echo off
22

3-
if "%1" == "docker" goto label_docker
4-
53
goto label_windows
64

75
:label_windows
@@ -54,38 +52,3 @@ if %main_py_err% neq 0 (
5452
exit /b %main_py_err%
5553

5654
:label_windows_after
57-
58-
59-
:label_docker
60-
where docker >nul 2>nul
61-
if %errorlevel% neq 0 (
62-
echo.
63-
echo ^[mfc.bat^] You must have Docker installed.
64-
echo Please install Docker and try again.
65-
exit /b 1
66-
)
67-
68-
69-
echo ^[mfc.bat^] Fetching image...
70-
docker pull henryleberre/mfc
71-
if %errorlevel% neq 0 (
72-
echo.
73-
echo ^[mfc.bat^] Docker: Failed to fetch image.
74-
echo Pleasure ensure docker is running.
75-
exit /b 1
76-
)
77-
78-
echo ^[mfc.bat^] Starting container...
79-
docker run --interactive --tty --rm ^
80-
--mount type=bind,source="%cd%",target=/home/me/MFC ^
81-
henryleberre/mfc
82-
83-
if %errorlevel% neq 0 (
84-
echo.
85-
echo Docker: Fatal container runtime error.
86-
exit /b 1
87-
)
88-
89-
90-
exit /b 0
91-
:label_docker_after

mfc.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ elif [ "$1" '==' "format" ]; then
3232
. "$(pwd)/toolchain/bootstrap/python.sh"
3333

3434
shift; . "$(pwd)/toolchain/bootstrap/format.sh" $@; exit 0
35-
elif [ "$1" '==' "docker" ]; then
36-
shift; . "$(pwd)/toolchain/bootstrap/docker.sh" $@; exit 0
3735
elif [ "$1" '==' "venv" ]; then
3836
shift; . "$(pwd)/toolchain/bootstrap/python.sh" $@; return
3937
elif [ "$1" '==' "clean" ]; then

0 commit comments

Comments
 (0)