Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues for mac x86_64 and mac arm64 #20113

Merged
merged 20 commits into from
Dec 16, 2024
Merged
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
2 changes: 2 additions & 0 deletions src/CMake/DetermineVisItArchitecture.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ MACRO(DETERMINE_VISIT_ARCHITECTURE ARCH)
ENDIF(${_OSX_MAJOR_VERSION} STREQUAL "1")
ELSEIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
SET(${ARCH} darwin-x86_64)
ELSEIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64")
SET(${ARCH} darwin-arm64)
ELSE(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386")
SET(${ARCH} darwin-ppc)
ENDIF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386")
Expand Down
7 changes: 6 additions & 1 deletion src/bin/frontendlauncher
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ if test "$osname" = "Linux"; then
platform="linux-intel"
fi
elif test "$osname" = "Darwin"; then
platform="darwin-x86_64"
proc=$(uname -m)
if test "$proc" = "x86_64"; then
platform="darwin-x86_64"
elif test "$proc" = "arm64"; then
platform="darwin-arm64"
fi
elif test "$osname" = "AIX"; then
if test "$OBJECT_MODE" = "32"; then
platform="ibm-aix-pwr"
Expand Down
10 changes: 10 additions & 0 deletions src/bin/internallauncher
Original file line number Diff line number Diff line change
Expand Up @@ -2800,6 +2800,8 @@ class MainLauncher(object):
if mach == "x86_64":
supportedarches.append("darwin-x86_64")
supportedarches.append("darwin-i386")
elif mach == "arm64":
supportedarches.append("darwin-arm64")
else:
supportedarches.append("darwin-i386")
else:
Expand Down Expand Up @@ -2832,6 +2834,14 @@ class MainLauncher(object):
supportedarches.append("darwin-x86_64")
supportedarches.append("darwin-i386")
break
procname = line.find("Chip:")
if procname != -1:
if "Apple M" in line:
supportedarches.append("darwin-arm64")
else:
supportedarches.append("darwin-x86_64")
supportedarches.append("darwin-i386")
break
elif self.os == "freebsd":
mach = uname("-m")
version = uname("-r")
Expand Down
15 changes: 10 additions & 5 deletions src/common/misc/InstallationFunctions.C
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ ReadInstallationInfo(std::string &distName, std::string &configName, std::string

"darwin-i386",
"darwin-x86_64",
"darwin-arm64",

// Deprecated
"darwin-ppc",
Expand Down Expand Up @@ -977,6 +978,7 @@ ReadInstallationInfo(std::string &distName, std::string &configName, std::string

"darwin-i386",
"darwin-x86_64",
"darwin-arm64",

// Deprecated
"darwin-ppc",
Expand Down Expand Up @@ -1068,13 +1070,16 @@ ReadInstallationInfo(std::string &distName, std::string &configName, std::string
}
}

#ifdef __APPLE__
#if defined(__APPLE__)
if(!platformDetermined)
{
if(sizeof(long) == 8)
distName = "darwin-x86_64";
else
distName = "darwin-i386";
# if defined(__arm64__)
distName = "darwin-arm64";
# elif defined(__x86_64__)
distName = "darwin-x86_64";
# else
distName = "darwin-i386";
# endif
platformDetermined = true;
}
#endif
Expand Down
233 changes: 233 additions & 0 deletions src/config-site/sce2aux.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
#/Users/miller86/visit/3.4RC/release/build-mb-3.4.2-darwin-23-arm64-release/thirdparty_shared/third_party/cmake/3.24.3/darwin-arm64/bin/cmake
##
## /Users/miller86/visit/3.4RC/src/tools/dev/scripts/build_visit generated host.cmake
## created: Fri Dec 13 09:33:08 PST 2024
## system: Darwin sce2aux 23.6.0 Darwin Kernel Version 23.6.0: Thu Sep 12 23:35:29 PDT 2024; root:xnu-10063.141.1.701.1~1/RELEASE_ARM64_T6000 arm64
## by: miller86

##
## Setup VISITHOME & VISITARCH variables.
##
SET(VISITHOME /Users/miller86/visit/3.4RC/release/build-mb-3.4.2-darwin-23-arm64-release/thirdparty_shared/third_party)
SET(VISITARCH darwin-arm64)

## Compiler flags.
##
VISIT_OPTION_DEFAULT(VISIT_C_COMPILER clang TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_CXX_COMPILER clang++ TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_FORTRAN_COMPILER no TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_C_FLAGS "-fno-common -fexceptions" TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_CXX_FLAGS "-fno-common -fexceptions" TYPE STRING)

##
## Parallel Build Setup.
##
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON TYPE BOOL)
## (configured w/ mpi compiler wrapper)
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER /Users/miller86/visit/3.4RC/release/build-mb-3.4.2-darwin-23-arm64-release/thirdparty_shared/third_party/mpich/3.3.1/darwin-arm64/bin/mpicc TYPE FILEPATH)

##
## VisIt Thread Option
##
VISIT_OPTION_DEFAULT(VISIT_THREAD OFF TYPE BOOL)

##############################################################
##
## Database reader plugin support libraries
##
## The HDF5 and NetCDF libraries must be first so that
## their libdeps are defined for any plugins that need them.
##
## For libraries with LIBDEP settings, order matters.
## Libraries with LIBDEP settings that depend on other
## Library's LIBDEP settings must come after them.
##############################################################
##

##
## ZLIB
##
SETUP_APP_VERSION(ZLIB 1.2.13)
VISIT_OPTION_DEFAULT(VISIT_ZLIB_DIR ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH})

##
## Python
##
VISIT_OPTION_DEFAULT(VISIT_PYTHON_DIR ${VISITHOME}/python/3.9.18/${VISITARCH})

##
## QT6
##
SETUP_APP_VERSION(QT 6.4.2)
VISIT_OPTION_DEFAULT(VISIT_QT_DIR ${VISITHOME}/qt/6.4.2/${VISITARCH})

##
## OSPRay
##
SETUP_APP_VERSION(OSPRAY 3.2.0)
VISIT_OPTION_DEFAULT(VISIT_OSPRAY_DIR ${VISITHOME}/ospray/${OSPRAY_VERSION}/${VISITARCH})

##
## VTK
##
SETUP_APP_VERSION(VTK 9.2.6)
VISIT_OPTION_DEFAULT(VISIT_VTK_DIR ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_VTK_INCDEP ZLIB_INCLUDE_DIR)
VISIT_OPTION_DEFAULT(VISIT_VTK_LIBDEP ZLIB_LIBRARY)

##
## MPICH
##
SETUP_APP_VERSION(MPICH 3.3.1)
VISIT_OPTION_DEFAULT(VISIT_MPICH_DIR ${VISITHOME}/mpich/${MPICH_VERSION}/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MPICH_INSTALL ON TYPE BOOL)

# Tell VisIt the parallel compiler so it can deduce parallel flags
VISIT_OPTION_DEFAULT(VISIT_MPI_COMPILER ${VISIT_MPICH_DIR}/bin/mpicc TYPE FILEPATH)
VISIT_OPTION_DEFAULT(VISIT_PARALLEL ON TYPE BOOL)

##
## SZIP
##
VISIT_OPTION_DEFAULT(VISIT_SZIP_DIR ${VISITHOME}/szip/2.1/${VISITARCH})

##
## HDF5
##
VISIT_OPTION_DEFAULT(VISIT_HDF5_DIR ${VISITHOME}/hdf5/1.8.14/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_MPI_DIR ${VISITHOME}/hdf5_mpi/1.8.14/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}/lib z TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_HDF5_MPI_LIBDEP ${VISITHOME}/szip/2.1/${VISITARCH}/lib sz ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}/lib z TYPE STRING)

##
## ADIOS
## (configured w/ mpi compiler wrapper)
##
SETUP_APP_VERSION(ADIOS 1.13.1)
VISIT_OPTION_DEFAULT(VISIT_ADIOS_DIR ${VISITHOME}/adios/${ADIOS_VERSION}/${VISITARCH})

##
## BLOSC2
##
VISIT_OPTION_DEFAULT(VISIT_BLOSC2_DIR ${VISITHOME}/blosc2/2.11.3/${VISITARCH})

##
## ADIOS2
##
SETUP_APP_VERSION(ADIOS2 2.10.0-rc1)
VISIT_OPTION_DEFAULT(VISIT_ADIOS2_DIR ${VISITHOME}/adios2-ser/${ADIOS2_VERSION}/${VISITARCH})
## (configured w/ mpi compiler wrapper)
VISIT_OPTION_DEFAULT(VISIT_ADIOS2_PAR_DIR ${VISITHOME}/adios2-par/${ADIOS2_VERSION}/${VISITARCH})

##
## AdvIO
##
VISIT_OPTION_DEFAULT(VISIT_ADVIO_DIR ${VISITHOME}/AdvIO/1.2/${VISITARCH})

##
## BOOST
##
SETUP_APP_VERSION(BOOST 1_67_0)
VISIT_OPTION_DEFAULT(VISIT_BOOST_DIR ${VISITHOME}/boost/${BOOST_VERSION}/${VISITARCH})

##
## Boxlib
##
VISIT_OPTION_DEFAULT(VISIT_BOXLIB_DIR ${VISITHOME}/boxlib/1.3.5/${VISITARCH})

##
## CFITSIO
##
VISIT_OPTION_DEFAULT(VISIT_CFITSIO_DIR ${VISITHOME}/cfitsio/3006/${VISITARCH})

##
## CGNS
##
VISIT_OPTION_DEFAULT(VISIT_CGNS_DIR ${VISITHOME}/cgns/4.1.0/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_CGNS_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)

##
## Silo
##
VISIT_OPTION_DEFAULT(VISIT_SILO_DIR ${VISITHOME}/silo/4.10.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} ZLIB_LIBRARY_DIR z TYPE STRING)

##
## Conduit
##
SETUP_APP_VERSION(CONDUIT 0.9.2)
VISIT_OPTION_DEFAULT(VISIT_CONDUIT_DIR ${VISITHOME}/conduit/v0.9.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_CONDUIT_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} ${VISIT_SILO_LIBDEP} TYPE STRING)

##
## FMS
##
VISIT_OPTION_DEFAULT(VISIT_FMS_DIR ${VISITHOME}/fms/0.2/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_FMS_LIBDEP CONDUIT_LIBRARY_DIR conduit CONDUIT_LIBRARY_DIR conduit_blueprint CONDUIT_LIBRARY_DIR conduit_relay ${VISIT_CONDUIT_LIBDEP} TYPE STRING)

##
## GDAL
##
VISIT_OPTION_DEFAULT(VISIT_GDAL_DIR ${VISITHOME}/gdal/2.2.4/${VISITARCH})

##
## H5Part
##
SETUP_APP_VERSION(H5PART 1.6.6)
VISIT_OPTION_DEFAULT(VISIT_H5PART_DIR ${VISITHOME}/h5part/${H5PART_VERSION}/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_H5PART_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)

##
## IceT
##
VISIT_OPTION_DEFAULT(VISIT_ICET_DIR ${VISITHOME}/icet/77c708f9090236b576669b74c53e9f105eedbd7e/${VISITARCH})

##
## MFEM
##
VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/4.6/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MFEM_INCDEP CONDUIT_INCLUDE_DIR FMS_INCLUDE_DIR TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_MFEM_LIBDEP ${VISIT_CONDUIT_LIBDEP} ${VISITHOME}/zlib/${ZLIB_VERSION}/${VISITARCH}/lib z TYPE STRING)

##
## Mili
##
VISIT_OPTION_DEFAULT(VISIT_MILI_DIR ${VISITHOME}/mili/23.02/${VISITARCH})

##
## MOAB
##
VISIT_OPTION_DEFAULT(VISIT_MOAB_DIR ${VISITHOME}/moab/5.5.0/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MOAB_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)
VISIT_OPTION_DEFAULT(VISIT_MOAB_MPI_DIR ${VISITHOME}/moab_mpi/5.5.0/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_MOAB_MPI_LIBDEP HDF5_MPI_LIBRARY_DIR hdf5_mpi ${VISIT_HDF5_MPI_LIBDEP} TYPE STRING)

##
## NetCDF
##
VISIT_OPTION_DEFAULT(VISIT_NETCDF_DIR ${VISITHOME}/netcdf/4.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_NETCDF_LIBDEP HDF5_LIBRARY_DIR hdf5_hl HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP} TYPE STRING)

##
## QWT
##
SETUP_APP_VERSION(QWT 6.3.0)
VISIT_OPTION_DEFAULT(VISIT_QWT_DIR ${VISITHOME}/qwt/${QWT_VERSION}/${VISITARCH})

##
## Uintah
##
SETUP_APP_VERSION(UINTAH 2.6.3)
VISIT_OPTION_DEFAULT(VISIT_UINTAH_DIR ${VISITHOME}/uintah/${UINTAH_VERSION}/${VISITARCH})

##
## VTKM
##
VISIT_OPTION_DEFAULT(VISIT_VTKM_DIR ${VISITHOME}/vtkm/v1.9.0/${VISITARCH})

##
## Xdmf
##
VISIT_OPTION_DEFAULT(VISIT_XDMF_DIR ${VISITHOME}/Xdmf/2.1.1/${VISITARCH})
VISIT_OPTION_DEFAULT(VISIT_XDMF_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISITHOME}/vtk/${VTK_VERSION}/${VISITARCH}/lib vtklibxml2.${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} TYPE STRING)

8 changes: 7 additions & 1 deletion src/osxfixup/osxfixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,13 @@ def fixup_items(items,lib_maps,prefix_path):
shexe(dep_cmd)

def main():
prefix_path = "darwin-x86_64"
if os.uname().machine == "x86_64":
prefix_path = "darwin-x86_64"
elif os.uname().machine == "arm64":
prefix_path = "darwin-arm64"
else:
print("[response from 'os.uname().machine' is not recognized]")
sys.exit(-1)
if len(sys.argv) > 1:
prefix_path = sys.argv[1]
prefix_path = os.path.abspath(prefix_path)
Expand Down
1 change: 1 addition & 0 deletions src/test/tests/unit/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def FormatLauncherOutput(cmd):
"linux-intel" : "$PLATFORM",
"linux-x86_64" : "$PLATFORM",
"darwin-i386" : "$PLATFORM",
"darwin-arm64" : "$PLATFORM",
"darwin-x86_64" : "$PLATFORM"}

output = FilterLauncherOutput(output, replacements)
Expand Down
Loading