Skip to content

Commit

Permalink
Getting 3.4.1 building on Intel Mac (#19293) (#19396)
Browse files Browse the repository at this point in the history
  • Loading branch information
markcmiller86 committed Mar 20, 2024
1 parent 717362e commit ef67adb
Show file tree
Hide file tree
Showing 14 changed files with 356 additions and 474 deletions.
5 changes: 4 additions & 1 deletion src/CMake/FindADIOS2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
# Justin Privitera, Thu Jan 18 09:56:51 PST 2024
# adios2 libs have changed so I removed many of the old ones.
#
# Mark C. Miller, Tue Mar 19 12:20:18 PDT 2024
# Adjust parallel to include both serial and parallel libs.
#****************************************************************************/

# Use the ADIOS_DIR hint from the config-site .cmake file
Expand All @@ -41,6 +43,8 @@ endif()
if(VISIT_PARALLEL)
if(NOT WIN32)
SET_UP_THIRD_PARTY(ADIOS2_PAR LIBS
adios2_c adios2_atl adios2_dill adios2_evpath adios2_ffs
adios2_perfstubs adios2_cxx11 adios2_core adios2_enet
adios2_c_mpi adios2_cxx11_mpi adios2_core_mpi)
else()
SET_UP_THIRD_PARTY(ADIOS2_PAR LIBS
Expand All @@ -49,4 +53,3 @@ if(VISIT_PARALLEL)
adios2_c_mpi adios2_cxx11_mpi adios2_core_mpi)
endif()
endif()

51 changes: 51 additions & 0 deletions src/tools/dev/masonry/opts/mb-3.4.1-darwin-21-x86_64-release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{"bootstrap_visit":
{"version": "3.4.1",
"build_types": ["release"],
"branch": "3.4RC",
"arch": "darwin-x86_64",
"cert": "Developer ID Application: Lawrence Livermore National Laboratory (A827VH86QR)",
"entitlements": "/Users/miller86/visit/visit/34rc/src/tools/dev/masonry/opts/visit.entitlements",
"notarize": {"username":"miller86@llnl.gov",
"password":"@keychain:VisIt",
"asc_provider":"A827VH86QR",
"bundle_id":"gov.llnl.visit"},
"make_nthreads": 2,
"skip_checkout": "yes",
"git": {"mode":"ssh","git_uname":"markcmiller86"},
"build_visit": { "cmake_ver": "3.24.3",
"args":"--no-thirdparty",
"libs":["cmake",
"vtkm",
"ispc",
"embree",
"tbb",
"ospray",
"python",
"vtk9",
"qt6",
"qwt",
"boost",
"mpich",
"adios",
"blosc2",
"adios2",
"advio",
"boxlib",
"cfitsio",
"conduit",
"gdal",
"h5part",
"hdf5",
"cgns",
"netcdf",
"mfem",
"fms",
"silo",
"szip",
"icet",
"mili",
"zlib",
"xdmf",
"uintah",
"moab"]}
}}
5 changes: 3 additions & 2 deletions src/tools/dev/scripts/bv_support/bv_adios2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,18 +199,19 @@ function build_adios2
cfg_opts="${cfg_opts} -DCMAKE_C_FLAGS:STRING=\"${C_OPT_FLAGS}\""
cfg_opts="${cfg_opts} -DCMAKE_CXX_FLAGS:STRING=\"${CXX_OPT_FLAGS}\""
cfg_opts="${cfg_opts} -DADIOS2_USE_SST:BOOL=ON"
cfg_opts="${cfg_opts} -DADIOS2_USE_Sodium:STRING=NO"

# Use Blosc2
if [[ "$DO_BLOSC2" == "yes" ]] ; then
BLOSC2_INSTALL_DIR="${VISITDIR}/blosc2/${BLOSC2_VERSION}/${VISITARCH}"
BLOSC2_INCLUDE_DIR="${BLOSC2_INSTALL_DIR}/include"
# note: lib dir can be `lib``, or `lib64` depending on the platform
if [[ -d "${BLOSC2_INSTALL_DIR}/lib64/" ]] ; then
BLOSC2_LIBRARY="${BLOSC2_INSTALL_DIR}/lib64/libblosc2.so"
BLOSC2_LIBRARY="${BLOSC2_INSTALL_DIR}/lib64/libblosc2.${SO_EXT}"
fi

if [[ -d "${BLOSC2_INSTALL_DIR}/lib/" ]] ; then
BLOSC2_LIBRARY="${BLOSC2_INSTALL_DIR}/lib/libblosc2.so"
BLOSC2_LIBRARY="${BLOSC2_INSTALL_DIR}/lib/libblosc2.${SO_EXT}"
fi

cfg_opts="${cfg_opts} -DADIOS2_USE_Blosc2:BOOL=ON"
Expand Down
192 changes: 155 additions & 37 deletions src/tools/dev/scripts/bv_support/bv_advio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,42 +66,162 @@ function bv_advio_ensure
fi
}

function apply_advio_12_mavericks_patch
function apply_advio_12_darwin_patch
{
patch -p0 << \EOF
diff -c AdvIO-1.2/Base/AdvTypes.h.orig AdvIO-1.2/Base/AdvTypes.h
*** AdvIO-1.2/Base/AdvTypes.h.orig 2014-11-19 17:29:43.000000000 -0800
--- AdvIO-1.2/Base/AdvTypes.h 2014-11-19 17:30:32.000000000 -0800
***************
*** 30,53 ****
#error c++ support is disabled. Please recompile AdvIO!!
#endif
- #if SIZEOF_BOOL != 0
-
- /* use C++-builtin boolean (do nothing) */
-
- #elif USE_STL
-
- /* use stl's boolean */
- #include <stl.h>
-
- #else
-
- /* use own boolean */
- typedef int bool;
- const bool false = 0;
- const bool true = !false;
-
- #endif
-
#else
/*---------- C ----------*/
--- 30,35 ----
--- AdvIO-1.2/configure 2006-02-14 05:19:56.000000000 -0800
+++ AdvIO-1.2/configure.new 2024-02-09 16:28:49.000000000 -0800
@@ -1897,11 +1897,12 @@
#line 1898 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(short));
+ fprintf(f, "%d\n", (int)sizeof(short));
exit(0);
}
EOF
@@ -1936,11 +1937,12 @@
#line 1937 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(int));
+ fprintf(f, "%d\n", (int)sizeof(int));
exit(0);
}
EOF
@@ -1975,11 +1977,12 @@
#line 1976 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(long));
+ fprintf(f, "%d\n", (int)sizeof(long));
exit(0);
}
EOF
@@ -2014,11 +2017,12 @@
#line 2015 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(long long));
+ fprintf(f, "%d\n", (int)sizeof(long long));
exit(0);
}
EOF
@@ -2053,11 +2057,12 @@
#line 2054 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(float));
+ fprintf(f, "%d\n", (int)sizeof(float));
exit(0);
}
EOF
@@ -2092,11 +2097,12 @@
#line 2093 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(double));
+ fprintf(f, "%d\n", (int)sizeof(double));
exit(0);
}
EOF
@@ -2131,11 +2137,12 @@
#line 2132 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(long double));
+ fprintf(f, "%d\n", (int)sizeof(long double));
exit(0);
}
EOF
@@ -2170,11 +2177,12 @@
#line 2171 "configure"
#include "confdefs.h"
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(size_t));
+ fprintf(f, "%d\n", (int)sizeof(size_t));
exit(0);
}
EOF
@@ -2309,15 +2317,13 @@
cat > conftest.$ac_ext <<EOF
#line 2311 "configure"
#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
#include <stdio.h>
+#include <stdlib.h>
-main()
+int main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
- fprintf(f, "%d\n", sizeof(bool));
+ fprintf(f, "%d\n", (int)sizeof(bool));
exit(0);
}
EOF
@@ -3969,7 +3975,7 @@
#============================================================
-subdirs="${subdirs} Base FileIO IDL DocIO doc"
+subdirs="${subdirs} Base FileIO DocIO doc"
#if test "${adv_cv_lib_micogtk}" = "yes"; then
# subdirs="${subdirs} Frame"
# subdirs="${subdirs} Compo"
EOF
if [[ $? != 0 ]] ; then
echo "Failed applying Darwin patch"
return 1
fi

Expand All @@ -111,10 +231,7 @@ EOF
function apply_advio_12_patch
{
if [[ "$OPSYS" == "Darwin" ]] ; then
if [[ `sw_vers -productVersion` == 10.9.[0-9]* || `sw_vers -productVersion` == 10.1*.[0-9]* ]] ; then
info "Applying OS X patch . . ."
apply_advio_12_mavericks_patch
fi
apply_advio_12_darwin_patch
fi

return $?
Expand All @@ -139,7 +256,7 @@ function apply_advio_patch
# Added patch for OS X 10.9 Mavericks. #
# #
# Kevin Griffin, Mon Aug 8 17:34:52 PDT 2016 #
# Updated patch for OS X 10.1*. #
# Updated patch for OS X 10.1*. #
# *************************************************************************** #

function build_advio
Expand Down Expand Up @@ -193,6 +310,7 @@ function build_advio
if [[ "$VISIT_BUILD_MODE" == "Debug" ]]; then
ADVIO_DEBUG="--enable-debug"
fi
C_OPT_FLAGS="-Wno-error=implicit-function-declaration"
set -x
env CXX="$CXX_COMPILER" CC="$C_COMPILER" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
Expand Down
1 change: 1 addition & 0 deletions src/tools/dev/scripts/bv_support/bv_cfitsio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ function build_cfitsio
info "Configuring CFITSIO . . ."
cd $CFITSIO_BUILD_DIR || error "Can't cd to cfits IO build dir."

C_OPT_FLAGS="-Wno-error=implicit-function-declaration"
set -x
env CXX="$CXX_COMPILER" CC="$C_COMPILER" \
CFLAGS="$CFLAGS $C_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $CXX_OPT_FLAGS" \
Expand Down

0 comments on commit ef67adb

Please sign in to comment.