You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross-compiling is the process of building software on one system architecture (like a login node) to be run on a different architecture (like a compute node). This section provides a historical overview of how this was done on systems that are no longer in service.
311
281
312
-
CMake loads `craype-haswell` for configuration, then swaps to `craype-mic-knl`
313
-
before compilation.
282
+
### 6.2. Historical Example: Knights Landing (KNL) on Cray XC40
314
283
315
-
### 6.3. Manual Cross-Compile
284
+
A common historical use case was compiling for Intel Knights Landing (KNL) nodes on Cray XC40 systems, such as the retired Mutrino and Cori machines. These supercomputers had login nodes with a standard CPU architecture (e.g., Haswell) but used the different KNL architecture for their compute nodes.
316
285
317
-
For manual cross-compiling on Cray XC40:
286
+
To build software for KNL, a "module swapping" technique was required. The build process involved:
287
+
1. Loading the compiler module for the login node architecture (e.g., `craype-haswell`) to configure the project.
318
288
319
-
1. Load `craype-haswell` module
320
-
321
-
2. Run cmake configure command (see section 5.2), adding:
2. Switching to the compiler module for the compute node architecture (e.g., `craype-mic-knl`) before starting the actual compilation.
327
290
328
-
3. Switch to `craype-mic-knl` module:
329
-
```bash
330
-
module swap craype-haswell craype-mic-knl
331
-
```
332
-
333
-
4. Build:
334
-
```bash
335
-
cmake --build . --config Release
336
-
```
291
+
This process was managed by special CMake toolchain files and custom batch scripts, which were often automated within the `ctest` framework.
337
292
338
-
### 6.4. Machine-Specific Batch Scripts
293
+
### 6.3. Cross-Compilation on Current Systems
339
294
340
-
Batch script arguments for KNL may differ between systems:
295
+
The specific hardware (Cray XC40, KNL) and the build procedures described above are historical and no longer in use.
341
296
342
-
| System | SBATCH Arguments |
343
-
|--------|------------------|
344
-
| Mutrino |`#SBATCH -p knl -C quad,cache`|
345
-
| Cori |`#SBATCH -C knl,quad,cache`|
297
+
While cross-compilation is less common on many modern, homogeneous HPC clusters, it is still a necessary technique for advanced architectures, such as systems with different processor types or accelerators (e.g., GPUs).
346
298
347
-
Edit batch scripts in `hdf5-<version>/bin/batch/` or modify
348
-
`LOCAL_BATCH_SCRIPT_NAME` and `LOCAL_BATCH_SCRIPT_PARALLEL_NAME` in
@@ -447,7 +397,7 @@ This is available on Linux kernels 2.4 and greater.
447
397
### 8.2. Cray Systems
448
398
449
399
- Use `CC=cc`, `FC=ftn`, `CXX=CC` after loading compiler modules
450
-
- Unload `craype-hugepages2M` if loaded
400
+
- Unload `craype-hugepages2M` if loaded (**Note**: This is situational advice and is not a universal rule, but it may be a valid troubleshooting step if you encounter memory-related performance issues or allocation errors.)
451
401
- Disable shared libraries if encountering linking issues:
0 commit comments