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

Fix MATLAB bindings for MacOS, backported from master #3953

Merged
merged 1 commit into from
Dec 2, 2023
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: 1 addition & 1 deletion bindings/C/adios2/c/adios2_c_adios.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ adios2_adios *adios2_init_config_mpi(const char *config_file, MPI_Comm comm);

#else
#define adios2_init() adios2_init_serial()
#define adios2_init_config(config_file) adios2_init_config_seria(config_file)
#define adios2_init_config(config_file) adios2_init_config_serial(config_file)
#endif

/**
Expand Down
10 changes: 10 additions & 0 deletions bindings/Matlab/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ MEXLIBS="LDFLAGS=${ADIOS_LIBS}"
ADIOS_INC=-I${ADIOS_DIR}/include
ADIOS_LIBS=`${ADIOS_DIR}/bin/adios2-config --c-libs`

### MacOS - example using homebrew installed ADIOS2 and Xcode 15 clang
### 1) Install homebrew (https://brew.sh/) and Xcode (App Store)
### 2) brew install adios2
### OR
### 2) Compile Adios2 from scratch and update ADIOS_DIR below to match install directory
#ADIOS_DIR=/opt/homebrew/opt/adios2
#ADIOS_INC=-I${ADIOS_DIR}/include
#ADIOS_LIBS=-Wl,-rpath,${ADIOS_DIR}/lib -shared -L${ADIOS_DIR}/lib -ladios2_c -ladios2_core
#MEXLIBS="LDFLAGS=${ADIOS_LIBS}"


MEXOPTS=-largeArrayDims -DDEBUG CFLAGS="-g -std=c99 -fPIC -O0"
default:
Expand Down
2 changes: 1 addition & 1 deletion bindings/Matlab/adiosopenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])

/********************************************************/
/* Open ADIOS file now and get variables and attributes */
adiosobj = adios2_init(false);
adiosobj = adios2_init_serial();
group = adios2_declare_io(adiosobj, "matlabiogroup"); // name is arbitrary
fp = adios2_open(group, fname, adios2_mode_read);
if (fp == NULL)
Expand Down
Loading