Problem with installation of IBAMR on Ubuntu 18.04

222 views
Skip to first unread message

Ezat Shokrani

unread,
Sep 6, 2021, 10:48:50 AM9/6/21
to ibamr...@googlegroups.com

Dear IBAMR developers,

 

I am installing the latest version of IBAMR on Ubuntu 18.04. I have installed all third-parties in my “sfw” folder. I have also configured and made the source code. I have attached the output result from the terminal while compiling the IBAMR source code. I did not receive any error during my installation. However, when I would like to make the “flow_past_cylinder” example in ConstraintIB branch by using the command “make examples”, I see this error.

 

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$ make examples

  CXX      main2d-RigidBodyKinematics.o

  CXX      main2d-example.o

  CXXLD    main2d

if test "../../../../IBAMR" != "../../.." ; then \

  cp -f ../../../../IBAMR/examples/ConstraintIB/flow_past_cylinder/input2d /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder ; \

  cp -f ../../../../IBAMR/examples/ConstraintIB/flow_past_cylinder/cylinder2d.vertex /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder ; \

fi ;

 

 

and therefore, the executable file “input2d” was not created. This error can be seen for other examples too.

 

I would be wondering if you could solve this issue.

 

 

Best regards,

Ezat Shokrani

IBAMR Configure.txt

Yicheng Chen

unread,
Sep 7, 2021, 2:06:42 AM9/7/21
to IBAMR Users
Hi  Ezat,

I am a user, too. In my experience, now you only need to input "./main2d input2d" for running this example.
BTW, do you run the example in /ibamr-opt folder? Or you are running it in the source folder (/sfw/ibamr/IBAMR/examples/..). The "make examples" is set to be applied in /ibamr-opt folder.

-Yicheng Chen

Boyce Griffith

unread,
Sep 7, 2021, 10:27:11 AM9/7/21
to ibamr...@googlegroups.com


On Sep 6, 2021, at 10:48 AM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear IBAMR developers,

 

I am installing the latest version of IBAMR on Ubuntu 18.04. I have installed all third-parties in my “sfw” folder. I have also configured and made the source code. I have attached the output result from the terminal while compiling the IBAMR source code. I did not receive any error during my installation. However, when I would like to make the “flow_past_cylinder” example in ConstraintIB branch by using the command “make examples”, I see this error.

 

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$ make examples
  CXX      main2d-RigidBodyKinematics.o
  CXX      main2d-example.o
  CXXLD    main2d
if test "../../../../IBAMR" != "../../.." ; then \
  cp -f ../../../../IBAMR/examples/ConstraintIB/flow_past_cylinder/input2d /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder ; \
  cp -f ../../../../IBAMR/examples/ConstraintIB/flow_past_cylinder/cylinder2d.vertex /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder ; \
fi ;

 


This does not seem to show an error. Are there other messages printed to the terminal that were not copied here?

 and therefore, the executable file “input2d” was not created. This error can be seen for other examples too.


Here, the executable is "main2d". If everything compiled correctly, you would do something like:

./main2d input2d

to run the example. The file "input2d" includes various physical and numerical settings that you can update.

Ezat Shokrani

unread,
Sep 7, 2021, 11:52:26 AM9/7/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

Thanks for your response. Related to your first question I should mention that there are no other messages printed to the terminal. 
I am sorry I made a mistake when I wrote my previous email. In fact, there is no "main2d" executable file in the folder produced by inserting the command "make examples" in the terminal. Therefore, I cannot run the example using the command "./main2d input2d" in the path shown in the previous email.

I would so grateful if you could guide me on this issue.

Kind regards,
Ezat Shokrani

--
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 on the web visit https://groups.google.com/d/msgid/ibamr-users/91F99D06-F204-43F8-877C-A33B63CD594B%40gmail.com.

Boyce Griffith

unread,
Sep 7, 2021, 11:44:13 PM9/7/21
to ibamr...@googlegroups.com

On Sep 7, 2021, at 11:52 AM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,

Thanks for your response. Related to your first question I should mention that there are no other messages printed to the terminal. 
I am sorry I made a mistake when I wrote my previous email. In fact, there is no "main2d" executable file in the folder produced by inserting the command "make examples" in the terminal. Therefore, I cannot run the example using the command "./main2d input2d" in the path shown in the previous email.

I would so grateful if you could guide me on this issue.

What do you get if you run:

$ ls -la /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder

Ezat Shokrani

unread,
Sep 8, 2021, 1:01:59 AM9/8/21
to ibamr...@googlegroups.com

Dear Professor Boyce Griffith,


Thanks for your response. If I run your command, I would got the following message:


(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$ ls -la /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder

total 14588

drwxrwxr-x 4 asus asus 4096 Sep 6 16:41 .

drwxrwxr-x 11 asus asus 4096 Aug 28 14:34 ..

-rwxrwxr-x 1 asus asus 15078 Sep 6 16:41 cylinder2d.vertex

drwxrwxr-x 2 asus asus 4096 Sep 6 16:40 .deps

-rwxrwxr-x 1 asus asus 11080 Sep 6 16:41 input2d

drwxrwxr-x 2 asus asus 4096 Sep 6 16:40 .libs

-rwxrwxr-x 1 asus asus 11826120 Sep 6 16:41 main2d

-rw-rw-r-- 1 asus asus 2846072 Sep 6 16:40 main2d-example.o

-rw-rw-r-- 1 asus asus 175576 Sep 6 16:40 main2d-RigidBodyKinematics.o

-rw-rw-r-- 1 asus asus 38614 Aug 28 14:34 Makefile

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$



Best regards,

Ezat Shokrani


Boyce Griffith

unread,
Sep 8, 2021, 4:07:51 PM9/8/21
to IBAMR Users
On Sep 8, 2021, at 1:01 AM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,


Thanks for your response. If I run your command, I would got the following message:


(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$ ls -la /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder

total 14588

drwxrwxr-x 4 asus asus 4096 Sep 6 16:41 .

drwxrwxr-x 11 asus asus 4096 Aug 28 14:34 ..

-rwxrwxr-x 1 asus asus 15078 Sep 6 16:41 cylinder2d.vertex

drwxrwxr-x 2 asus asus 4096 Sep 6 16:40 .deps

-rwxrwxr-x 1 asus asus 11080 Sep 6 16:41 input2d

drwxrwxr-x 2 asus asus 4096 Sep 6 16:40 .libs

-rwxrwxr-x 1 asus asus 11826120 Sep 6 16:41 main2d

-rw-rw-r-- 1 asus asus 2846072 Sep 6 16:40 main2d-example.o

-rw-rw-r-- 1 asus asus 175576 Sep 6 16:40 main2d-RigidBodyKinematics.o

-rw-rw-r-- 1 asus asus 38614 Aug 28 14:34 Makefile

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$


It looks like main2d was built. What happens if you do:

$ cd ~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder
$ ./main2d input2d

Ezat Shokrani

unread,
Sep 9, 2021, 12:21:22 AM9/9/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

Thank you so much for your response. Based on your command which was run, I got the following error:

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$ ./main2d input2d
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Signal received
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020
[0]PETSC ERROR: ./main2d on a linux-opt named asus-Ezat by asus Thu Sep  9 07:00:41 2021
[0]PETSC ERROR: Configure options --CC=/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicc --CXX=/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicxx --FC=/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpif90 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --FOPTFLAGS=-O3 --PETSC_ARCH=linux-opt --with-debugging=0 --download-hypre=1 --with-x=0
[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 50162059.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/ConstraintIB/flow_past_cylinder$


In fact, There is no exe. file (main2d) in my folder and I cannot see it. I would be wondering if you could help me solve this issue.

Best regards,
Ezat Shokrani










Boyce Griffith

unread,
Sep 14, 2021, 9:42:53 PM9/14/21
to noreply-spamdigest via IBAMR Users
On Sep 9, 2021, at 12:21 AM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,


There shouldn’t be a main2d.exe — just an executable file named “main2d”.

Do any of the other examples work in either IBAMR or SAMRAI?

— Boyce

Ezat Shokrani

unread,
Sep 15, 2021, 12:59:04 AM9/15/21
to ibamr...@googlegroups.com
Dear professor Boyce Griffith,

Thanks for your response. I have complied and run other examples too. for example:
(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2$ make examples
  CXX      main2d-example.o
  CXXLD    main2d
  CXX      main3d-example.o
  CXXLD    main3d
if test "../../../../../IBAMR" != "../../../.." ; then \
  cp -f ../../../../../IBAMR/examples/IB/explicit/ex2/input{2d.cylinder,2d.cylinder_stabilized,3d.cylinder,3d.sphere} /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2 ; \
  cp -f ../../../../../IBAMR/examples/IB/explicit/ex2/cylinder2d_{128,256,512,1024}.{vertex,spring} /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2 ; \
  cp -f ../../../../../IBAMR/examples/IB/explicit/ex2/cylinder3d_{128,256,512}.vertex /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2 ; \
  cp -f ../../../../../IBAMR/examples/IB/explicit/ex2/sphere3d_{32,64,128,256}.{vertex,spring} /home/asus/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2 ; \
fi ;
(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2$ ./main2d input2d

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://www.mcs.anl.gov/petsc/documentation/faq.html#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Signal received
[0]PETSC ERROR: See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.13.4, Aug 01, 2020
[0]PETSC ERROR: ./main2d on a linux-opt named Ezat by asus Wed Sep 15 09:16:48 2021
[0]PETSC ERROR: Configure options --CC=/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicc --CXX=/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicxx --FC=/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpif90 --COPTFLAGS=-O3 --CXXOPTFLAGS=-O3 --FOPTFLAGS=-O3 --LDFLAGS="-L/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/lib -Wl,-rpath,/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/lib" --with-default-arch=0 --PETSC_ARCH=linux-opt --with-debugging=0 --with-c++-support --with-hypre=1 --download-hypre=1 --with-x=0

[0]PETSC ERROR: #1 User provided function() line 0 in  unknown file
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 50162059.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2$ ls
cylinder2d_1024.spring  cylinder3d_512.vertex        sphere3d_128.spring
cylinder2d_1024.vertex  input2d.cylinder             sphere3d_128.vertex
cylinder2d_128.spring   input2d.cylinder_stabilized  sphere3d_256.spring
cylinder2d_128.vertex   input3d.cylinder             sphere3d_256.vertex
cylinder2d_256.spring   input3d.sphere               sphere3d_32.spring
cylinder2d_256.vertex   main2d                       sphere3d_32.vertex
cylinder2d_512.spring   main2d-example.o             sphere3d_64.spring
cylinder2d_512.vertex   main3d                       sphere3d_64.vertex
cylinder3d_128.vertex   main3d-example.o
cylinder3d_256.vertex   Makefile
(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2$


This problem can be seen for other examples too. In my first email, I have mentioned that this error exists for other examples too. In addition, I  have attached a file related to when I configured the IBAMR before making it. I am using gcc, g++ and gfortran version 7.5.0 (the default version in ubuntu 18.04). I hoped this could help.

I would be wondering if you could help me.

Best regards,
Ezat Shokrani






































Boyce Griffith

unread,
Sep 15, 2021, 8:27:52 AM9/15/21
to noreply-spamdigest via IBAMR Users
Does this only happen with the optimized build, or are you also unable to run things with a debugging build?

Ezat Shokrani

unread,
Sep 15, 2021, 8:45:10 AM9/15/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

I did not make the "debugging build" in IBAMR, therefore, I am not sure if this could happen for it.

Kind regards,
Ezat Shokrani

Boyce Griffith

unread,
Sep 15, 2021, 9:08:23 AM9/15/21
to IBAMR Users
On Sep 15, 2021, at 8:44 AM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,

I did not make the "debugging build" in IBAMR, therefore, I am not sure if this could happen for it.

Can you check to see if you have any problems with the debugging build? See instructions here: https://ibamr.github.io/linux.

Wells, David

unread,
Sep 15, 2021, 9:46:54 AM9/15/21
to IBAMR Users
Hi Ezat,

I think this problem has a simple solution. You ran

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2$ ./main2d input2d

and it crashed. In the current directory you have

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-opt/examples/IB/explicit/ex2$ ls
cylinder2d_1024.spring  cylinder3d_512.vertex        sphere3d_128.spring
cylinder2d_1024.vertex  input2d.cylinder             sphere3d_128.vertex
cylinder2d_128.spring   input2d.cylinder_stabilized  sphere3d_256.spring
cylinder2d_128.vertex   input3d.cylinder             sphere3d_256.vertex
cylinder2d_256.spring   input3d.sphere               sphere3d_32.spring
cylinder2d_256.vertex   main2d                       sphere3d_32.vertex
cylinder2d_512.spring   main2d-example.o             sphere3d_64.spring
cylinder2d_512.vertex   main3d                       sphere3d_64.vertex
cylinder3d_128.vertex   main3d-example.o
cylinder3d_256.vertex   Makefile

There is no input2d file in the current directory - you should try ./main2d input2d.cylinder instead.

Best,
David

From: ibamr...@googlegroups.com <ibamr...@googlegroups.com> on behalf of Boyce Griffith <boy...@gmail.com>
Sent: Wednesday, September 15, 2021 9:08 AM
To: IBAMR Users <ibamr...@googlegroups.com>
Subject: Re: [ibamr-users] Problem with installation of IBAMR on Ubuntu 18.04
 

Ezat Shokrani

unread,
Sep 15, 2021, 10:02:41 AM9/15/21
to ibamr...@googlegroups.com
Dear Mr. David Wells,

Thanks for your response. I used your command (./main2d input2d.cylinder) and received the same error. I am now making the "debugging build" as Professor Boyce Griffith suggested and will inform you of that.

Best regards,
Ezat Shokrani

Ezat Shokrani

unread,
Sep 15, 2021, 12:08:34 PM9/15/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

Based on your suggestion, I made the "debugging build" and now I am able to build the examples. For examples, I could run this example:

(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-dbg/examples/ConstraintIB/flow_past_cylinder$ make examples

  CXX      main2d-RigidBodyKinematics.o
  CXX      main2d-example.o
  CXXLD    main2d
if test "../ ../../../IBAMR" != "../../.." ; then \
  cp -f ../../../../IBAMR/examples/ConstraintIB/flow_past_cylinder/input2d /home/asus/IBAMR/sfw/ibamr/ibamr-objs-dbg/examples/ConstraintIB/flow_past_cylinder ; \
  cp -f ../../../../IBAMR/examples/ConstraintIB/flow_past_cylinder/cylinder2d.vertex /home/asus/IBAMR/sfw/ibamr/ibamr-objs-dbg/examples/ConstraintIB/flow_past_cylinder ; \
fi ;
(base) asus@Ezat:~/IBAMR/sfw/ibamr/ibamr-objs-dbg/examples/ConstraintIB/flow_past_cylinder$ ./main2d input2d
Warning in input2d at line 115 column 41 : Redefinition of key ``calculate_structure_linear_mom''
   // Options to calculate the structure's momenta
                                         ^
Warning in input2d at line 116 column 41 : Redefinition of key ``calculate_structure_rotational_mom''
   // Options to calculate the structure's momenta
                                         ^
IBStandardInitializer:  Reading from input files.
  base filename: cylinder2d
  assigned to level 1 of the Cartesian grid patch hierarchy

 ++++++++++++++++  STRUCTURE NO. 0  ++++++++++++++++++++++++++


 VOLUME OF THE MATERIAL ELEMENT           = 0.000965222
 VOLUME OF THE STRUCTURE                  = 0.767351
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

IBHydrodynamicForceEvaluator::registerStructure: integration box modified from
[-0.65, 0.65] x [-0.65, 0.65] x [0, 0]
to
[-0.653696, 0.715953] x [-0.682171, 0.682171] x [0, 0]
IBStandardInitializer:  Deallocating initialization data.
IBStandardInitializer:  Deallocating initialization data.


Writing visualization files...


+++++++++++++++++++++++++++++++++++++++++++++++++++
At beginning of timestep # 0
Simulation time is 0

At end       of timestep # 0
Simulation time is 0.002
+++++++++++++++++++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++++++++++++++++++
At beginning of timestep # 1
Simulation time is 0.002

At end       of timestep # 1
Simulation time is 0.004
+++++++++++++++++++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++++++++++++++++++
At beginning of timestep # 2
Simulation time is 0.004

At end       of timestep # 2
Simulation time is 0.006
+++++++++++++++++++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++++++++++++++++++
At beginning of timestep # 3
Simulation time is 0.006

At end       of timestep # 3
Simulation time is 0.008
+++++++++++++++++++++++++++++++++++++++++++++++++++


+++++++++++++++++++++++++++++++++++++++++++++++++++
At beginning of timestep # 4
Simulation time is 0.008



The run continues.
I would be wondering if you could guide me how to solve the issue related to the "optimized build".

Kind regards,
Ezat Shokrani

Boyce Griffith

unread,
Sep 15, 2021, 4:26:32 PM9/15/21
to IBAMR Users
On Sep 15, 2021, at 12:08 PM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,


Can you send (or resend) config.log from the build that does not work?

Ezat Shokrani

unread,
Sep 15, 2021, 11:43:16 PM9/15/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

Thanks for your response. I have attached the "config.log" to this email.

Best regards
Ezat Shokrani

config.log

Boyce Griffith

unread,
Sep 17, 2021, 8:43:39 AM9/17/21
to ibamr...@googlegroups.com
I don't spot any obvious problems in the IBAMR config.log file. Can you also send config.log for SAMRAI build corresponding to linux-g++-opt?

If you haven't already done so, can you verify that the PETSc tests (for PETSC_ARCH=linux-opt) and at least one of the SAMRAI examples (for linux-g++-opt) work?

-- Boyce

Ezat Shokrani

unread,
Sep 17, 2021, 11:48:44 AM9/17/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

Thanks for your response. I am not sure if I understood your meaning correctly. I have attached the config folder for SAMRAI build corresponding to linux-g++-opt to this email. There is no config.log file in the SAMRAI folder.

Related to your second question, I do not know how I should verify that PETSc tests work. I would be wondering if you could guide me how I can do it.

Best regards,
Ezat Shokrani

config.zip

Boyce Griffith

unread,
Sep 17, 2021, 11:54:18 AM9/17/21
to ibamr...@googlegroups.com

On Sep 17, 2021, at 11:48 AM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,

Thanks for your response. I am not sure if I understood your meaning correctly. I have attached the config folder for SAMRAI build corresponding to linux-g++-opt to this email. There is no config.log file in the SAMRAI folder.

config.log will be in the directory where you built SAMRAI. (If you followed the IBAMR instructions, then this directory would be named objs-opt.

Please also go into that build directory and verify one of the SAMRAI examples works --- I've often used the ConvDiff example for this purpose.

Related to your second question, I do not know how I should verify that PETSc tests work. I would be wondering if you could guide me how I can do it.

When building PETSc, if the build (appears to) succeed, then PETSc's build system prints out the command to run to verify that the tests run. The command also appears at the end of PETSc's configure.log file --- you should be able to find that file here: $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/configure.log.

Ezat Shokrani

unread,
Sep 17, 2021, 12:43:11 PM9/17/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

I have found the config.log file related to the SAMRAI build and attached it.

Unfortunately, I do not know how to verify that example works.


For PETSc, I went into this directory:
(base) asus@Ezat:~/IBAMR/sfw/petsc/3.13.4/linux-opt/lib/petsc/conf$

and I found the config.log for PETSc there that I have attached too.

Best regards,
Ezat Shokrani


config.log
configure.log

Boyce Griffith

unread,
Sep 17, 2021, 12:46:57 PM9/17/21
to IBAMR Users
On Sep 17, 2021, at 12:42 PM, Ezat Shokrani <shokr...@gmail.com> wrote:

Dear Professor Boyce Griffith,

I have found the config.log file related to the SAMRAI build and attached it.

Unfortunately, I do not know how to verify that example works.

You should be able to do something like:

$ cd /path/to/samrai/objs-opt/examples/ConvDiff
$ make main2d
$ ./main2d sample_input/heated-floor-2d.input

For PETSc, I went into this directory:
(base) asus@Ezat:~/IBAMR/sfw/petsc/3.13.4/linux-opt/lib/petsc/conf$

and I found the config.log for PETSc there that I have attached too.

What happens if you run the command to test the PETSc build? The command should be something like:

$ cd /home/asus/IBAMR/sfw/petsc/3.13.4
$ make PETSC_DIR=/home/asus/IBAMR/sfw/petsc/3.13.4 PETSC_ARCH=linux-opt check

Ezat Shokrani

unread,
Sep 17, 2021, 1:05:06 PM9/17/21
to ibamr...@googlegroups.com
Dear Professor Boyce Griffith,

Thanks for your repose.

For the first part, I run your commands and reported the output in the terminal ( I can see some errors here):
(base) asus@Ezat:~/IBAMR/sfw/samrai/2.4.4/objs-opt/examples/ConvDiff$ make main2d
if test -f stamp-3d; then make clean; fi
touch stamp-2d
make PDIM=2 main-2d
make[1]: Entering directory '/home/asus/IBAMR/sfw/samrai/2.4.4/objs-opt/examples/ConvDiff'
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicxx -O2 -Wall -O3   -I. -I../../include -I../../../SAMRAI-2.4.4/include -I/home/asus/IBAMR/sfw/linux/silo/4.10/include -I/home/asus/IBAMR/sfw/linux/hdf5/1.10.6/include  -I/usr/include/mpich     -DDISPLAY -DNDIM=2 -DTESTING=0  -c main.C -o main.o
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicxx -O2 -Wall -O3   -I. -I../../include -I../../../SAMRAI-2.4.4/include -I/home/asus/IBAMR/sfw/linux/silo/4.10/include -I/home/asus/IBAMR/sfw/linux/hdf5/1.10.6/include  -I/usr/include/mpich     -DDISPLAY -DNDIM=2 -DTESTING=0  -c ConvDiff.C -o ConvDiff.o
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicxx -O2 -Wall -O3   -I. -I../../include -I../../../SAMRAI-2.4.4/include -I/home/asus/IBAMR/sfw/linux/silo/4.10/include -I/home/asus/IBAMR/sfw/linux/hdf5/1.10.6/include  -I/usr/include/mpich     -DDISPLAY -DNDIM=2 -DTESTING=0  -c MainRestartData.C -o MainRestartData.o
m4 -DFORTDIR=fortran/2d  -DSAMRAI_FORTDIR=../../../SAMRAI-2.4.4/include fortran/2d/compute_rhs.m4 > compute_rhs.f
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpif90 -O2 -O3  -c compute_rhs.f -o compute_rhs.o
m4 -DFORTDIR=fortran/2d  -DSAMRAI_FORTDIR=../../../SAMRAI-2.4.4/include fortran/2d/init.m4 > init.f
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpif90 -O2 -O3  -c init.f -o init.o
m4 -DFORTDIR=fortran/2d  -DSAMRAI_FORTDIR=../../../SAMRAI-2.4.4/include fortran/2d/rkstep.m4 > rkstep.f
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpif90 -O2 -O3  -c rkstep.f -o rkstep.o
m4 -DFORTDIR=fortran/2d  -DSAMRAI_FORTDIR=../../../SAMRAI-2.4.4/include fortran/2d/tag_cells.m4 > tag_cells.f
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpif90 -O2 -O3  -c tag_cells.f -o tag_cells.o
/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/bin/mpicxx -O2 -Wall -O3   -L../../lib  -L/home/asus/IBAMR/sfw/linux/silo/4.10/lib -L/home/asus/IBAMR/sfw/linux/hdf5/1.10.6/lib -Wl,-rpath /home/asus/IBAMR/sfw/linux/hdf5/1.10.6/lib -L/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/lib -Wl,-rpath /home/asus/IBAMR/sfw/linux/openmpi/4.0.2/lib -L/usr/lib/gcc/x86_64-linux-gnu/7 -Wl,-rpath /usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -Wl,-rpath /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -Wl,-rpath /usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/lib/x86_64-linux-gnu -Wl,-rpath /lib/x86_64-linux-gnu -L/lib/../lib -Wl,-rpath /lib/../lib -L/usr/lib/x86_64-linux-gnu -Wl,-rpath /usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -Wl,-rpath /usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../..  main.o ConvDiff.o MainRestartData.o compute_rhs.o init.o rkstep.o tag_cells.o  \
../../lib/libSAMRAI2d_appu.a ../../lib/libSAMRAI2d_algs.a ../../lib/libSAMRAI2d_solv.a ../../lib/libSAMRAI2d_geom.a ../../lib/libSAMRAI2d_mesh.a ../../lib/libSAMRAI2d_math_std.a ../../lib/libSAMRAI2d_pdat_std.a ../../lib/libSAMRAI2d_xfer.a ../../lib/libSAMRAI2d_hier.a ../../lib/libSAMRAI.a    -lsilo  -lhdf5   -lz   -ldl gfortran m -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -L/usr/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/lib/../lib -L/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l -l -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lpthread -lm  -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l gfortran -l m -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lpthread -o main2d
g++: error: gfortran: No such file or directory
g++: error: m: No such file or directory
Makefile:32: recipe for target 'main-2d' failed
make[1]: *** [main-2d] Error 1
make[1]: Leaving directory '/home/asus/IBAMR/sfw/samrai/2.4.4/objs-opt/examples/ConvDiff'
Makefile:27: recipe for target 'main2d' failed
make: *** [main2d] Error 2
(base) asus@Ezat:~/IBAMR/sfw/samrai/2.4.4/objs-opt/examples/ConvDiff$ ./main2d sample_input/heated-floor-2d.input
bash: ./main2d: No such file or directory
(base) asus@Ezat:~/IBAMR/sfw/samrai/2.4.4/objs-opt/examples/ConvDiff$



For the second part, I have also run your command and brought the result here:

(base) asus@Ezat:~/IBAMR/sfw/petsc/3.13.4$ make PETSC_DIR=/home/asus/IBAMR/sfw/petsc/3.13.4 PETSC_ARCH=linux-opt check
Running check examples to verify correct installation
Using PETSC_DIR=/home/asus/IBAMR/sfw/petsc/3.13.4 and PETSC_ARCH=linux-opt
C/C++ example src/snes/tutorials/ex19 run successfully with 1 MPI process
C/C++ example src/snes/tutorials/ex19 run successfully with 2 MPI processes
C/C++ example src/snes/tutorials/ex19 run successfully with hypre
Fortran example src/snes/tutorials/ex5f run successfully with 1 MPI process
Completed test examples
(base) asus@Ezat:~/IBAMR/sfw/petsc/3.13.4$



I would be wondering if you could guide me on this problem.


Kind regards,
Ezat Shokrani












Wells, David

unread,
Sep 20, 2021, 12:46:23 PM9/20/21
to ibamr...@googlegroups.com
Hi Ezat,

Unfortunately there are multiple bugs in the Makefiles generated by SAMRAI (not anything we did) - in particular check out the link line:

-lsilo  -lhdf5   -lz   -ldl gfortran m -L/usr/lib/gcc/x86_64-linux-gnu/7/../../.. -L/usr/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/lib/../lib -L/lib/x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../../lib -L/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/home/asus/IBAMR/sfw/linux/openmpi/4.0.2/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l -l -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lpthread -lm  -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -l gfortran -l m -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lpthread -o main2d

there are a lot of things in there that just don't make sense, like "-l -l ". You may be able to get this to work by manually editing the Makefile and making sure that all the link flags look like "-lpthread" (i.e., "-l" followed by the library name).

If you are willing, I have an alternative suggestion to what Boyce proposed that might also narrow down the cause of the problem. Could you recompile the optimized build of IBAMR additionally with the "-g" flag (i.e., use the same dependencies, same optimization flags, just add "-g")? I think that if you do that and we run some executables in a debugger (or valgrind) we can get a stack trace that may also show where things have gone wrong.

Best,
David

From: ibamr...@googlegroups.com <ibamr...@googlegroups.com> on behalf of Ezat Shokrani <shokr...@gmail.com>
Sent: Friday, September 17, 2021 1:04 PM
To: ibamr...@googlegroups.com <ibamr...@googlegroups.com>

Ezat Shokrani

unread,
Sep 29, 2021, 10:17:29 AM9/29/21
to ibamr...@googlegroups.com
Dear Dr. David Wells,

Thank you so much for your answer and sorry for the late response. Based on your recommendation about adding "-g" to the optimized build of IBAMR, I have again configured it and added this line while I am recompiling.

About changing the " -l ", I am not sure how I can do it. I have attached the folders generated by SAMRAI from two path here:

1-asus@Ezat:~/IBAMR/sfw/samrai/2.4.4/linux-g++-opt$
2-asus@Ezat:~/IBAMR/sfw/samrai/2.4.4/objs-opt$


I would be wondering if you could guide me how I should change the files until they work.

Best regards,
Ezat Shokrani




linux-g++-opt.zip
objs-opt.zip

Wells, David

unread,
Sep 29, 2021, 3:40:46 PM9/29/21
to ibamr...@googlegroups.com
Hi Ezat,

I tried to fix SAMRAI's link line in your installed directory tree (linux-g++-opt): try replacing linux-g++-opt/config/Makefile.config with the file I attached. You can try and see if that lets you successfully compile, link, and run SAMRAI executables.

I am not sure I can give you guidance on this. The SAMRAI makefile is riddled with bugs. For example, they assume several libraries are statically linked that are not statically linked. They also forget to populate library names. They insert spaces where there should not be spaces. The list of subtle bugs is quite long. If you are not already familiar with reading generated makefiles then this is going to be too hard to usefully explain over email.

That being said - I don't think SAMRAI is the problem, and trying to debug this remotely is unlikely to work. I simply cannot test these changes since they are highly dependent on where things are on your computer. I strongly recommend running the program (now that you compiled with debug info, i.e., the -g flag) in a debugger or valgrind to see where things crash. That is much more likely to give useful information and its something we can do without needing to manually patch anything.

Best,
David

Sent: Wednesday, September 29, 2021 10:16 AM
Makefile.config
Reply all
Reply to author
Forward
0 new messages