Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 40 additions & 0 deletions easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-12-foss-2024a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name = 'OpenFOAM'
version = '12'

homepage = 'https://www.openfoam.org/'
description = """OpenFOAM is a free, open source CFD software package.
OpenFOAM has an extensive range of features to solve anything from complex fluid flows
involving chemical reactions, turbulence and heat transfer,
to solid dynamics and electromagnetics."""

toolchain = {'name': 'foss', 'version': '2024a'}
toolchainopts = {'vectorize': False}

source_urls = ['https://github.com/OpenFOAM/OpenFOAM-%(version_major)s/archive']
sources = ['version-%(version)s.tar.gz']
patches = ['OpenFOAM-12-ThirdParty.patch']
checksums = [
{'version-%(version)s.tar.gz':
'e59fad54c62e64f1bb89dbaebe5f99a76dc0a6a91d9aad86042a7c4cef6d0744'},
{'OpenFOAM-12-ThirdParty.patch':
'b8a9abf3b8479d32d87654d833501f54abe57ceb9f06f7d2412a3e52d20108ec'},
]

builddependencies = [
('Bison', '3.8.2'),
('CMake', '3.29.3'),
('flex', '2.6.4'),
]

dependencies = [
('ncurses', '6.5'),
# OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes)
('METIS', '5.1.0'),
('SCOTCH', '7.0.5'),
('CGAL', '5.6.1'),
('ParaView', '5.13.1'),
('gnuplot', '6.0.1'),
('Zoltan', '3.901'),
]

moduleclass = 'cae'
7 changes: 6 additions & 1 deletion easybuild/easyconfigs/o/OpenMPI/OpenMPI-5.0.3-GCC-13.3.0.eb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ toolchain = {'name': 'GCC', 'version': '13.3.0'}

source_urls = ['https://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads']
sources = [SOURCELOWER_TAR_BZ2]
patches = [('OpenMPI-5.0.2_build-with-internal-cuda-header.patch', 1)]
patches = [
('OpenMPI-5.0.2_build-with-internal-cuda-header.patch', 1),
('OpenMPI-5.0.3_fix_c90_compliance.patch'),
]
checksums = [
{'openmpi-5.0.3.tar.bz2': '990582f206b3ab32e938aa31bbf07c639368e4405dca196fabe7f0f76eeda90b'},
{'OpenMPI-5.0.2_build-with-internal-cuda-header.patch':
'f52dc470543f35efef10d651dd159c771ae25f8f76a420d20d87abf4dc769ed7'},
{'OpenMPI-5.0.3_fix_c90_compliance.patch':
'ece1dff504673179daf298f74c978d31132fcde71af9eca38a530b30aec85cca'},
]

builddependencies = [
Expand Down
300 changes: 300 additions & 0 deletions easybuild/easyconfigs/o/OpenMPI/OpenMPI-5.0.3_fix_c90_compliance.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
# Remove all //-style comments, making this file safe to use with C89-style applications
# Based on https://github.com/open-mpi/ompi/pull/12830
From d5e2855bd983db1cce7172cbf87ae47731729316 Mon Sep 17 00:00:00 2001
From: Jeff Squyres <jeff@squyres.com>
Date: Sat, 28 Sep 2024 07:44:02 -0400
Subject: [PATCH] Update opal_portable_platform_real.h from upstream gasnet

Pull update from
https://bitbucket.org/berkeleylab/gasnet/src/stable/other/gasnet_portable_platform.h
at git hash a90966674. This update brings in two things:

1. Remove the need for the #define workarounds in
opal/include/opal/opal_portable_platform.h
2. Remove all //-style comments, making this file safe to use with
C89-style applications (per
https://github.com/open-mpi/ompi/issues/12710).

Many thanks to the gasnet team for including these changes in their
upstream repo.

Note that we still need the #ifndef SIZEOF_VOID_P protection in mpi.h.
This commit also makes a minor update in mpi.h[.in] to prefix an
OMPI-specific #define with "OMPI_". No one has ever complained about
this un-prefixed macro, but prefixing it it felt like the Right Thing
to do while mucking around with other portable_platform stuff.

Signed-off-by: Jeff Squyres <jeff@squyres.com>
(cherry picked from commit 50c05da32ceb7d375a590448122da9079b743686)
---
ompi/include/Makefile.am | 5 +-
ompi/include/mpi.h.in | 13 +---
opal/include/opal/opal_portable_platform.h | 13 ++--
.../opal/opal_portable_platform_real.h | 68 +++++++++++++------
4 files changed, 57 insertions(+), 42 deletions(-)

diff --git a/ompi/include/Makefile.am b/ompi/include/Makefile.am
index 05db27ced50..9b052b94920 100644
--- a/ompi/include/Makefile.am
+++ b/ompi/include/Makefile.am
@@ -47,8 +47,9 @@ include_HEADERS += \
endif

# These files are always installed in $(includedir), but shouldn't be
-# shipped since they are generated by configure from their .in
-# counterparts (which AM automatically ships).
+# shipped since they are generated by configure from .in counterparts
+# (which AM automatically ships) or other sources (which are shipped
+# by other Makefile.am's).
nodist_include_HEADERS = \
mpi.h \
mpi-ext.h \
diff --git a/ompi/include/mpi.h.in b/ompi/include/mpi.h.in
index b23c3337b72..23114892560 100644
--- a/ompi/include/mpi.h.in
+++ b/ompi/include/mpi.h.in
@@ -268,22 +268,15 @@
* hacks to eliminate warnings in the portable_platform.h file.
*/
# ifndef SIZEOF_VOID_P
-# define CLEANUP_SIZEOF_VOID_P 1
+# define OMPI_CLEANUP_SIZEOF_VOID_P 1
# define SIZEOF_VOID_P OPAL_SIZEOF_VOID_P
# else
-# define CLEANUP_SIZEOF_VOID_P 0
-# endif
-
-# ifndef _PORTABLE_PLATFORM_H
-# define _PORTABLE_PLATFORM_H 0
-# endif
-# ifndef PLATFORM_HEADER_VERSION
-# define PLATFORM_HEADER_VERSION 0
+# define OMPI_CLEANUP_SIZEOF_VOID_P 0
# endif

# include "mpi_portable_platform.h"

-#if CLEANUP_SIZEOF_VOID_P
+#if OMPI_CLEANUP_SIZEOF_VOID_P
#undef SIZEOF_VOID_P
#endif

diff --git a/opal/include/opal/opal_portable_platform.h b/opal/include/opal/opal_portable_platform.h
index fc09d04fdaf..7924c530baf 100644
--- a/opal/include/opal/opal_portable_platform.h
+++ b/opal/include/opal/opal_portable_platform.h
@@ -1,6 +1,7 @@
/*
* Copyright (c) 2021 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
+ * Copyright (c) 2024 Jeffrey M. Squyres. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@@ -8,19 +9,15 @@
* $HEADER$
*
* Wrapper around GASNet's gasnet_portable_platform.h to avoid
- * compiler warnings
+ * compiler warnings. This wrapper used to be necessary to add some
+ * additional #defines, but those issues have now been resolved
+ * upstream at gasnet. However, we left this wrapper file just to be
+ * able to handle any future workarounds, if necessary.
*/

#ifndef OPAL_PORTABLE_PLATFORM_H
#define OPAL_PORTABLE_PLATFORM_H 1

-#ifndef _PORTABLE_PLATFORM_H
-#define _PORTABLE_PLATFORM_H 0
-#endif
-#ifndef PLATFORM_HEADER_VERSION
-#define PLATFORM_HEADER_VERSION 0
-#endif
-
#include "opal/opal_portable_platform_real.h"

#endif
diff --git a/opal/include/opal/opal_portable_platform_real.h b/opal/include/opal/opal_portable_platform_real.h
index 170c207409c..6f21dbfa8d4 100644
--- a/opal/include/opal/opal_portable_platform_real.h
+++ b/opal/include/opal/opal_portable_platform_real.h
@@ -28,10 +28,11 @@
*/
/* Publish and enforce version number for the public interface to this header */
/* YOU ARE NOT PERMITTED TO CHANGE THIS SECTION WITHOUT DIRECT APPROVAL FROM DAN BONACHEA */
-#if _PORTABLE_PLATFORM_H != PLATFORM_HEADER_VERSION \
- || PLATFORM_HEADER_VERSION < 16
+#if !defined(_PORTABLE_PLATFORM_H) || !defined(PLATFORM_HEADER_VERSION) \
+ || _PORTABLE_PLATFORM_H != PLATFORM_HEADER_VERSION \
+ || PLATFORM_HEADER_VERSION < 22
#undef PLATFORM_HEADER_VERSION
-#define PLATFORM_HEADER_VERSION 16
+#define PLATFORM_HEADER_VERSION 22
#undef _PORTABLE_PLATFORM_H
#define _PORTABLE_PLATFORM_H PLATFORM_HEADER_VERSION
/* End Header versioning handshake */
@@ -115,14 +116,17 @@
#undef PLATFORM_COMPILER_UNKNOWN

#undef PLATFORM_OS_FAMILYNAME
+#undef PLATFORM_OS_SUBFAMILYNAME
#undef PLATFORM_OS_CATAMOUNT
-#undef PLATFORM_OS_CNL
#undef PLATFORM_OS_BGP
#undef PLATFORM_OS_BGQ
-#undef PLATFORM_OS_WSL
#undef PLATFORM_OS_K42
#undef PLATFORM_OS_UCLINUX
#undef PLATFORM_OS_LINUX
+#undef PLATFORM_OS_CNL
+#undef PLATFORM_OS_SUBFAMILY_CNL
+#undef PLATFORM_OS_WSL
+#undef PLATFORM_OS_SUBFAMILY_WSL
#undef PLATFORM_OS_BLRTS
#undef PLATFORM_OS_CYGWIN
#undef PLATFORM_OS_MSWINDOWS
@@ -167,6 +171,7 @@
#undef PLATFORM_ARCH_AARCH64
#undef PLATFORM_ARCH_TILE
#undef PLATFORM_ARCH_S390
+#undef PLATFORM_ARCH_RISCV
#undef PLATFORM_ARCH_UNKNOWN

/* prevent known old/broken versions of this header from loading */
@@ -291,7 +296,7 @@
PLATFORM_COMPILER_VERSION_INT(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__+0)
#define PLATFORM_COMPILER_VERSION_STR __PATHSCALE__

-#elif defined(__NVCOMPILER) // Must occur prior to PGI and CLANG
+#elif defined(__NVCOMPILER) /* Must occur prior to PGI and CLANG */
#define PLATFORM_COMPILER_NVHPC 1
#define PLATFORM_COMPILER_FAMILYNAME NVHPC
#define PLATFORM_COMPILER_FAMILYID 20
@@ -330,7 +335,7 @@
/* Include below might fail for ancient versions lacking this header, but testing shows it
works back to at least 5.1-3 (Nov 2003), and based on docs probably back to 3.2 (Sep 2000) */
#define PLATFORM_COMPILER_VERSION 0
- #elif defined(__x86_64__) /* bug 1753 - 64-bit omp.h upgrade happened in <6.0-8,6.1-1] */
+ #elif defined(__x86_64__) /* bug 1753 - 64-bit omp.h upgrade happenned in <6.0-8,6.1-1] */
#include "omp.h"
#if defined(_PGOMP_H)
/* 6.1.1 or newer */
@@ -341,7 +346,7 @@
#define PLATFORM_COMPILER_VERSION 0
#define PLATFORM_COMPILER_VERSION_STR "<=6.0-8"
#endif
- #else /* 32-bit omp.h upgrade happened in <5.2-4,6.0-8] */
+ #else /* 32-bit omp.h upgrade happenned in <5.2-4,6.0-8] */
#include "omp.h"
#if defined(_PGOMP_H)
/* 6.0-8 or newer */
@@ -590,7 +595,7 @@
#define PLATFORM_COMPILER_VERSION_STR __clang_version__
#endif

-// NOTE: PLATFORM_COMPILER_FAMILYID "20" is allocated to NVHPC, appearing earlier
+/* NOTE: PLATFORM_COMPILER_FAMILYID "20" is allocted to NVHPC, appearing earlier */

#else /* unknown compiler */
#define PLATFORM_COMPILER_UNKNOWN 1
@@ -750,17 +755,17 @@
PLATFORM_OS_<family>:
defined to a positive value if OS belongs to a given family, undef otherwise
PLATFORM_OS_FAMILYNAME:
- unquoted token which provides the compiler family name
+ unquoted token which provides the OS family name
+
+ Some systems also define a subfamily:
+ PLATFORM_OS_SUBFAMILY_<subfamily>: positive value or undef
+ PLATFORM_OS_SUBFAMILYNAME: unquoted token for subfamily name or undef
*/

#if defined(__LIBCATAMOUNT__) || defined(__QK_USER__)
#define PLATFORM_OS_CATAMOUNT 1
#define PLATFORM_OS_FAMILYNAME CATAMOUNT

-#elif defined(__CRAYXT_COMPUTE_LINUX_TARGET)
- #define PLATFORM_OS_CNL 1
- #define PLATFORM_OS_FAMILYNAME CNL
-
#elif defined(GASNETI_ARCH_BGP) || defined(__bgp__)
#define PLATFORM_OS_BGP 1
#define PLATFORM_OS_FAMILYNAME BGP
@@ -769,10 +774,6 @@
#define PLATFORM_OS_BGQ 1
#define PLATFORM_OS_FAMILYNAME BGQ

-#elif defined(GASNETI_ARCH_WSL)
- #define PLATFORM_OS_WSL 1
- #define PLATFORM_OS_FAMILYNAME WSL
-
#elif defined(__K42)
#define PLATFORM_OS_K42 1
#define PLATFORM_OS_FAMILYNAME K42
@@ -784,6 +785,14 @@
#elif defined(__linux) || defined(__linux__) || defined(__gnu_linux__)
#define PLATFORM_OS_LINUX 1
#define PLATFORM_OS_FAMILYNAME LINUX
+ #if defined(GASNETI_ARCH_WSL)
+ #define PLATFORM_OS_SUBFAMILY_WSL 1
+ #define PLATFORM_OS_SUBFAMILYNAME WSL
+ #elif defined(__CRAYXT_COMPUTE_LINUX_TARGET)
+ /* NOTE: As of 2022-07 this is ONLY defined for the Cray cc/CC wrappers, and not the raw PrgEnv compilers */
+ #define PLATFORM_OS_SUBFAMILY_CNL 1
+ #define PLATFORM_OS_SUBFAMILYNAME CNL
+ #endif

#elif defined(__blrts) || defined(__blrts__) || defined(__gnu_blrts__)
#define PLATFORM_OS_BLRTS 1
@@ -1031,6 +1040,16 @@
#define _PLATFORM_ARCH_32 1
#endif

+#elif defined(__riscv)
+ #define PLATFORM_ARCH_RISCV 1
+ #define PLATFORM_ARCH_FAMILYNAME RISCV
+ #define _PLATFORM_ARCH_LITTLE_ENDIAN 1
+ #if __riscv_xlen == 32
+ #define _PLATFORM_ARCH_32 1
+ #else /* (__riscv_xlen == 64) || (__riscv_xlen == 128) */
+ #define _PLATFORM_ARCH_64 1
+ #endif
+
#else /* unknown CPU */
#define PLATFORM_ARCH_UNKNOWN 1
#define PLATFORM_ARCH_FAMILYNAME UNKNOWN
@@ -1128,16 +1147,21 @@ int main(void) {
PLATFORM_DISPX(COMPILER_VERSION);
PLATFORM_DISP(COMPILER_VERSION_STR);
PLATFORM_DISP(COMPILER_IDSTR);
- #if PLATFORM_COMPILER_C_LANGLVL
+ #ifdef PLATFORM_COMPILER_C_LANGLVL
PLATFORM_DISPI(COMPILER_C_LANGLVL);
- #elif PLATFORM_COMPILER_CXX_LANGLVL
+ #elif defined(PLATFORM_COMPILER_CXX_LANGLVL)
PLATFORM_DISPI(COMPILER_CXX_LANGLVL);
#else
printf("WARNING: Missing PLATFORM_COMPILER_C(XX)_LANGLVL!");
#endif
PLATFORM_DISP(OS_FAMILYNAME);
+ #ifdef PLATFORM_OS_SUBFAMILYNAME
+ { const char * OS_SUBFAMILYNAME = PLATFORM_STRINGIFY(PLATFORM_OS_SUBFAMILYNAME);
+ PLATFORM_DISP(OS_SUBFAMILYNAME);
+ }
+ #endif
PLATFORM_DISP(ARCH_FAMILYNAME);
- #if PLATFORM_ARCH_32
+ #ifdef PLATFORM_ARCH_32
PLATFORM_DISPI(ARCH_32);
assert(sizeof(void *) == 4);
#else
@@ -1146,7 +1170,7 @@ int main(void) {
#endif
{ int x = 0x00FF;
unsigned char *p = (unsigned char *)&x;
- #if PLATFORM_ARCH_BIG_ENDIAN
+ #ifdef PLATFORM_ARCH_BIG_ENDIAN
PLATFORM_DISPI(ARCH_BIG_ENDIAN);
assert(*p == 0);
#else
Loading