Trouble accessing SAMRAI for IBAMR build

20 views
Skip to first unread message

Hamideh Rouhani

unread,
Sep 23, 2025, 8:30:25 PMSep 23
to IBAMR Users

Hi all,
I’m trying to build IBAMR on macOS and all dependencies are installed (PETSc, HYPRE, HDF5, Boost, Eigen, muParser), but I can’t access SAMRAI.

  • I tried cloning https://github.com/IBAMR/SAMRAI.git and the v2.4.4-patched branch, but it asks for credentials or says “repository not found.”

  • I don’t have GitHub access for private repos.

Has anyone successfully built IBAMR recently? Is SAMRAI public now, or is there a recommended way to get it for building IBAMR?

Thanks in advance!

Boyce Griffith

unread,
Sep 23, 2025, 11:57:42 PMSep 23
to IBAMR Users
Sorry for the confusion, but our fork of SAMRAI has been moved to https://github.com/IBAMR/IBSAMRAI2.

For most people, it is easiest to use autoibamr to install IBAMR and/or its dependencies.

— Boyce

--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/a19eca7b-26c0-4ff5-8a28-52b46844afean%40googlegroups.com.

Boyce Griffith

unread,
Sep 24, 2025, 12:10:51 AMSep 24
to IBAMR Users

On Sep 23, 2025, at 11:57 PM, Boyce Griffith <boy...@gmail.com> wrote:

Sorry for the confusion, but our fork of SAMRAI has been moved to https://github.com/IBAMR/IBSAMRAI2.

PS: Where are you seeing IBAMR instructions that point to https://github.com/IBAMR/SAMRAI?

Hamideh Rouhani

unread,
Sep 24, 2025, 7:53:39 PMSep 24
to ibamr...@googlegroups.com
Thanks for the reply 🙏. I tried that, but now I’m getting this error during configuration:
Setting up SAMRAI
CMake Error: FILE STRINGS file "/include/SAMRAI_config.h" cannot be read.
Could not find SAMRAI_path …

- Configuring incomplete, errors occurred!


Boyce Griffith

unread,
Sep 25, 2025, 7:39:16 AMSep 25
to IBAMR Users

On Sep 24, 2025, at 7:53 PM, Hamideh Rouhani <hamideh....@gmail.com> wrote:

Thanks for the reply 🙏. I tried that, but now I’m getting this error during configuration:
Setting up SAMRAI
CMake Error: FILE STRINGS file "/include/SAMRAI_config.h" cannot be read.
Could not find SAMRAI_path …
- Configuring incomplete, errors occurred!

Are you getting this error with autoibamr, or are you trying to build everything yourself?

On Wed, Sep 24, 2025 at 12:10 AM Boyce Griffith <boy...@gmail.com> wrote:


On Sep 23, 2025, at 11:57 PM, Boyce Griffith <boy...@gmail.com> wrote:

Sorry for the confusion, but our fork of SAMRAI has been moved to https://github.com/IBAMR/IBSAMRAI2.

PS: Where are you seeing IBAMR instructions that point to https://github.com/IBAMR/SAMRAI?

For most people, it is easiest to use autoibamr to install IBAMR and/or its dependencies.

— Boyce

On Sep 23, 2025, at 8:18 PM, Hamideh Rouhani <hamideh....@gmail.com> wrote:

Hi all,
I’m trying to build IBAMR on macOS and all dependencies are installed (PETSc, HYPRE, HDF5, Boost, Eigen, muParser), but I can’t access SAMRAI.

  • I tried cloning https://github.com/IBAMR/SAMRAI.git and the v2.4.4-patched branch, but it asks for credentials or says “repository not found.”

  • I don’t have GitHub access for private repos.

Has anyone successfully built IBAMR recently? Is SAMRAI public now, or is there a recommended way to get it for building IBAMR?

Thanks in advance!


--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/a19eca7b-26c0-4ff5-8a28-52b46844afean%40googlegroups.com.



--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ibamr-users/A0382EBD-A128-4C99-A34E-D151679C0864%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "IBAMR Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ibamr-users...@googlegroups.com.

Hamideh Rouhani

unread,
Sep 25, 2025, 9:15:09 AMSep 25
to ibamr...@googlegroups.com

I installed IBAMR using autoibamr on macOS (AppleClang with Homebrew MPI). The installation itself completed successfully, and IBAMR is built and installed under ~/autoibamr/packages/IBAMR-0.16.0.

When I tried to build with the --enable-examples option, I got a configuration error related to SAMRAI.


Wells, David

unread,
Sep 25, 2025, 10:54:16 AMSep 25
to ibamr...@googlegroups.com
Hi Hamideh,

What command did you execute which included --enable-examples?

Best,
David Wells

From: ibamr...@googlegroups.com <ibamr...@googlegroups.com> on behalf of Hamideh Rouhani <hamideh....@gmail.com>
Sent: Thursday, September 25, 2025 9:14 AM
To: ibamr...@googlegroups.com <ibamr...@googlegroups.com>
Subject: Re: [ibamr-users] Trouble accessing SAMRAI for IBAMR build
 
You don't often get email from hamideh....@gmail.com. Learn why this is important

Hamideh Rouhani

unread,
Sep 25, 2025, 11:00:27 AMSep 25
to ibamr...@googlegroups.com
Hello,

I ran the command:
./autoibamr.sh --enable-examples
inside the autoibamr directory to build IBAMR along with example codes.

Boyce Griffith

unread,
Sep 25, 2025, 11:14:06 AMSep 25
to IBAMR Users

On Sep 25, 2025, at 11:00 AM, Hamideh Rouhani <hamideh....@gmail.com> wrote:

Hello,

I ran the command:
./autoibamr.sh --enable-examples
inside the autoibamr directory to build IBAMR along with example codes.

If you pass that flag to autoibamr.sh, you should get an error:

invalid command line option <--enable-examples>. See -h for more information.

Hamideh Rouhani

unread,
Sep 25, 2025, 12:11:21 PMSep 25
to IBAMR Users

I installed IBSAMRAI2 via autoIBAMR following the instructions, but when building examples I get errors about SAMRAI not being found.

Summary of my setup:

  • IBAMR_DIR: /Users/H/IBAMR

  • SAMRAI_DIR: /Users/H/autoibamr/packages/IBSAMRAI2-2025.01.09

    CMake: 3.30.6

  • OpenMPI: 5.0.8

  • HDF5: 1.14.6 (Fortran ON, Parallel OFF)

  • Boost: 1.89.0

  • macOS: Darwin 23.6.0 (arm64)

Error:

FILE STRINGS file "/include/SAMRAI_config.h" cannot be read. Could not find SAMRAI_path using the following names: SAMRAI

It seems SAMRAI is not built or linked. How should I fix this?

Thank you.

Boyce Griffith

unread,
Sep 25, 2025, 12:26:15 PMSep 25
to IBAMR Users

On Sep 25, 2025, at 12:11 PM, Hamideh Rouhani <hamideh....@gmail.com> wrote:

I installed IBSAMRAI2 via autoIBAMR following the instructions, but when building examples I get errors about SAMRAI not being found.

Just to confirm these are IBAMR examples or the SAMRAI examples?

Summary of my setup:

  • IBAMR_DIR: /Users/H/IBAMR

  • SAMRAI_DIR: /Users/H/autoibamr/packages/IBSAMRAI2-2025.01.09

    CMake: 3.30.6

  • OpenMPI: 5.0.8

  • HDF5: 1.14.6 (Fortran ON, Parallel OFF)

  • Boost: 1.89.0

  • macOS: Darwin 23.6.0 (arm64)

Error:

FILE STRINGS file "/include/SAMRAI_config.h" cannot be read. Could not find SAMRAI_path using the following names: SAMRAI

Are you re-running SAMRAI configure or IBAMR cmake? This directory information should be set correctly 

It seems SAMRAI is not built or linked. How should I fix this?

If autoibamr.sh runs to completion, then SAMARI will be built. You can control exactly where it goes by using the --prefix flag when running autoibamr.sh.

I like to use something like --prefix=$HOME/code/autoibamr/dbg. Then IBSAMRAI2 will be in $HOME/code/autoibamr/dbg/IBSAMRAI2-2025.01.09.

autoibamr.sh can set up environment variables for these directory names:

~ ➜ source $HOME/code/autoibamr/dbg/configuration/enable.sh
~ ➜ echo $SAMRAI_DIR
/Users/boyceg/code/autoibamr/dbg/packages/IBSAMRAI2-2025.01.09/
~ ➜ echo $HDF5_DIR
/Users/boyceg/code/autoibamr/dbg/packages/hdf5-1.12.2

Boyce Griffith

unread,
Sep 25, 2025, 12:59:38 PMSep 25
to IBAMR Users

On Sep 25, 2025, at 12:25 PM, Boyce Griffith <boy...@gmail.com> wrote:



On Sep 25, 2025, at 12:11 PM, Hamideh Rouhani <hamideh....@gmail.com> wrote:

I installed IBSAMRAI2 via autoIBAMR following the instructions, but when building examples I get errors about SAMRAI not being found.

Just to confirm these are IBAMR examples or the SAMRAI examples?

PS: For IBAMR examples with autoibamr, we do have some instructions; see:

Hamideh Rouhani

unread,
Sep 25, 2025, 2:11:34 PMSep 25
to ibamr...@googlegroups.com

I have successfully installed IBAMR and SAMRAI using autoibamr.sh. My environment variables are set as follows:

echo $IBAMR_DIR → /Users/H/IBAMR echo $SAMRAI_ROOT → /Users/H/autoibamr/packages/IBSAMRAI2-2025.01.09 echo $SAMRAI_DIR → /Users/H/autoibamr/packages/IBSAMRAI2-2025.01.09/ echo $HDF5_DIR → /Users/H/autoibamr/packages/hdf5-1.12.2

I sourced the environment setup:

source /Users/H/autoibamr/configuration/enable.sh

Then I attempted to build the example ex0:

cd $IBAMR_DIR/examples/IB/explicit/ex0 mkdir build cd build cmake .. \ -DCMAKE_CXX_STANDARD=14 \ -DBOOST_ROOT=/opt/homebrew/opt/boost \ -DSAMRAI_ROOT=$SAMRAI_ROOT \ -DIBAMR_DIR=$IBAMR_DIR

However, I get the following error:

CMake Error at CMakeLists.txt:14 (IBAMR_ADD_EXAMPLE): Unknown CMake command "IBAMR_ADD_EXAMPLE".

Also, I get warnings about missing project() and cmake_minimum_required() commands.

I suspect this happens because the example's CMakeLists.txt cannot find IBAMR’s CMake macros.
I have already built IBAMR successfully, but when building examples, it seems CMake cannot locate the necessary IBAMR configuration.

Could someone clarify:

  1. Whether I need to pass additional flags to CMake when building examples?

  2. Whether there’s a special build step for examples in IBAMR (besides building IBAMR itself)?

  3. Whether my environment variables are incorrectly set for example building?

Thank you for your help.


Boyce Griffith

unread,
Sep 25, 2025, 3:23:28 PMSep 25
to IBAMR Users

On Sep 25, 2025, at 2:11 PM, Hamideh Rouhani <hamideh....@gmail.com> wrote:

I have successfully installed IBAMR and SAMRAI using autoibamr.sh. My environment variables are set as follows:

echo $IBAMR_DIR → /Users/H/IBAMR echo $SAMRAI_ROOT → /Users/H/autoibamr/packages/IBSAMRAI2-2025.01.09 echo $SAMRAI_DIR → /Users/H/autoibamr/packages/IBSAMRAI2-2025.01.09/ echo $HDF5_DIR → /Users/H/autoibamr/packages/hdf5-1.12.2

I sourced the environment setup:

source /Users/H/autoibamr/configuration/enable.sh

Then I attempted to build the example ex0:

cd $IBAMR_DIR/examples/IB/explicit/ex0 mkdir build cd build cmake .. \ -DCMAKE_CXX_STANDARD=14 \ -DBOOST_ROOT=/opt/homebrew/opt/boost \ -DSAMRAI_ROOT=$SAMRAI_ROOT \ -DIBAMR_DIR=$IBAMR_DIR

However, I get the following error:

CMake Error at CMakeLists.txt:14 (IBAMR_ADD_EXAMPLE): Unknown CMake command "IBAMR_ADD_EXAMPLE".

Also, I get warnings about missing project() and cmake_minimum_required() commands.

I suspect this happens because the example's CMakeLists.txt cannot find IBAMR’s CMake macros.
I have already built IBAMR successfully, but when building examples, it seems CMake cannot locate the necessary IBAMR configuration.

I wonder if you are pointing cmake to built version of IBAMR or if you are pointing it to the source code…

Could someone clarify:

  1. Whether I need to pass additional flags to CMake when building examples?

  2. Whether there’s a special build step for examples in IBAMR (besides building IBAMR itself)?

  3. Whether my environment variables are incorrectly set for example building?

David, can you chime in here? I am still a novice on using CMake with IBAMR.

However, notice that if you use

~ ➜ source $HOME/code/autoibamr/dbg/configuration/enable.sh

to get the environment variables, then the environment variable IBAMR_ROOT gives the location where IBAMR is built — I am 99% sure that is the directory that you should pass to cmake to build the example.

FWIW, I like to use autoibamr just to build IBAMR’s dependencies, and then build IBAMR myself. These kinds of commands will configure IBAMR outside of autoibamr:

~ ➜ source ~/code/autoibamr/dbg/configuration/enable.sh
~ ➜ cmake \
  -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_C_COMPILER="$(which mpicc)" \
  -DCMAKE_CXX_COMPILER="$(which mpicxx)" \
  -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
  -DCMAKE_Fortran_COMPILER="$(which mpif90)" \
  -DCMAKE_INSTALL_PREFIX="" \
  -DHDF5_ROOT=$HDF5_DIR \
  -DHYPRE_ROOT=$PETSC_DIR \
  -DIBAMR_FORCE_BUNDLED_BOOST=ON \
  -DIBAMR_FORCE_BUNDLED_EIGEN3=ON \
  -DIBAMR_FORCE_BUNDLED_MUPARSER=ON \
  -DLIBMESH_ROOT=$LIBMESH_DIR \
  -DLIBMESH_METHOD=devel \
  -DNUMDIFF_ROOT=$NUMDIFF_DIR \
  -DPETSC_ROOT=$PETSC_DIR \
  -DSAMRAI_ROOT=/Users/boyceg/sfw/samrai/IBSAMRAI2/darwin-clang-dbg \
  -DSILO_ROOT=$SILO_DIR \
  ../IBAMR

Then you can build IBAMR and build and run the examples:

~ ➜ make
~ ➜ cd examples/navier_stokes/ex1
~ ➜ make navier_stokes-ex1-2d
~ ➜ ./main2d input2d

This avoids the need to re-run CMake for each individual example.
Reply all
Reply to author
Forward
0 new messages