barbagroup/PetIBM

api_example_oscillatingcylinder make errors

shi-guangyu opened this issue · 5 comments

Hi, there,

I've installed PetIBM following the instructions online and run several 2D example cases.

However, when I tried to make the ~/sfw/petibm/PetIBM/examples/api_examples/oscillatingcylinder2dRe100_GPU, I met several problems.

First, there's no Makefile in this case directory, but when I run 'make oscillatingcylinder', the following errors occured:
In file included from oscillatingcylinder.cpp:8:0:
oscillatingcylinder.h:10:10: fatal error: petibm/rigidkinematics/rigidkinematics.h: No such file or directory.
#include <petibm/rigidkinematics/rigidkinematics.h>
compilation terminated.

Second, I noticed there's a Makefile and a folder .deps under this directory: ~/sfw/petibm/examples/api_examples/oscillatingcylinder2dRe100_GPU/, but when I tried to make the case after copying the Makefile and .deps folder to ~/sfw/petibm/PetIBM/examples/api_examples/oscillatingcylinder2dRe100_GPU, I met new errors:
cd ../../.. && make am--refresh
make[1]: Entering directory '/home/alven/sfw/petibm/PetIBM'
make[1]: *** No rule to make target 'am--refresh'. Stop.
make[1]: Leaving directory '/home/alven/sfw/petibm/PetIBM'
Makefile:363: recipe for target '../../../config.status' failed
make: *** [../../../config.status] Error 2

So, can you guys help me to figure out what went wrong. Or I need to prepare a Makefile myself?

Many thanks in advance.

Best wishes;

Guangyu

Hi, guys,

I just figured out I should run 'make oscillatingcylinder' under this directory: ~/sfw/petibm/examples/api_examples/oscillatingcylinder2dRe100_GPU, rather than the /PetIBM directory.

Another question is how can I create the files under .deps folder if I would like to write a new body kinematics?

Thanks a lot, guys.

Guangyu

Hi @shi-guangyu,
I can think of two options right now:

  1. Implement your example (with your kinematics) in the repository of PetIBM, writte a Makefile.am (see example for oscillatingcylinder2dRe100_GPU), run the bootstrap script autogen.sh in the root directory of the repo, and re-configure the software and make the new example (following what you did for oscillatingcylinder2dRe100_GPU).

or

  1. Once you have installed the PetIBM library, you can use it to implement your own application in a separate directory (e.g., in ~/sfw/my_petibm_application). I have some examples using CMake to do that; see petibm-rollingpitching or petibm-decoupledibpm. You can also simply use a Makefile: see petibm-flapping.

Thanks a lot, Mesnardo, I think I may need some time to get farmilar with the code before preceeding to new implementations.

I just found there's a folder called .deps in the same directory with Makefile, and there're several files but there's nothing in these files. Are these files necessary for compiling? How to name these files properly?

Guangyu

The .deps folder is automatically generated by the autotools chain during the configuration stage.
They are used by the Makefile automatically generated by autotools.
If you create a Makefile.am, it will automatically create a .deps folder for you; you should not have to really care of that.
If you use your own Makefile or CMake, you won't have a .deps folder.

Alright, I see, many thanks.

Guangyu