Error during p4est installation

319 views
Skip to first unread message

Lev Karatun

unread,
Dec 9, 2014, 3:51:34 AM12/9/14
to dea...@googlegroups.com
Hello!

I'm trying to install p4est on a Linux cluster as described here: http://www.dealii.org/developer/external-libs/p4est.html
I'm executing the setup script, but I'm getting the following error:

Build FAST version in /home/r/russ/lkaratun/distrib/aspect/p4est-build/FAST
configure: error: MPI C test failed
Error: Error in configure

I tested MPI by executing "mpirun -np 2 echo a", and got 2 a's as intended. So I'm not quite sure how do I get the script to see MPI.

Could you please help me with it?

Thanks in advance!

Lev.

Timo Heister

unread,
Dec 9, 2014, 8:17:29 AM12/9/14
to dea...@googlegroups.com
This is probably because CC is pointing to a non MPI compiler. What
version of p4est are you using? You can dig into the p4est-build
directory and check the config.log file to see what the problem is.
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Timo Heister
http://www.math.clemson.edu/~heister/

Lev Karatun

unread,
Dec 9, 2014, 3:09:01 PM12/9/14
to dea...@googlegroups.com
Hi Timo, thanks for the reply!

You're right, CC is currently pointing at gcc, not mpicc. Can you please tell me how can I change it? I didn't find any mention of gcc neither in setup script nor in configure script in p4est.

Lev.

Lei Qiao

unread,
Dec 9, 2014, 5:16:27 PM12/9/14
to dea...@googlegroups.com
Run " CC=mpicc ./configure --blablabla"

Lev Karatun

unread,
Dec 9, 2014, 5:29:14 PM12/9/14
to dea...@googlegroups.com
Thanks Lei, it worked!

Lev.
Message has been deleted

Wolfgang Bangerth

unread,
Jun 15, 2015, 10:25:23 AM6/15/15
to dea...@googlegroups.com
On 05/26/2015 09:49 AM, Lam DANG wrote:
> Hello
>
> I'm trying to install p4est on a Ubuntu by a command line /$ sh
> ./p4est-setup.sh p4est-1.1.tar.gz ./p4est/ from the folder contained
> p4est-1.1.tar.gz and p4est-setup.sh posted in link
> https://www.dealii.org/developer/external-libs/p4est.html
>
> An error is below:
> /./p4est-setup.sh: 31: ./p4est-setup.sh: Syntax error: "(" unexpected/

The problem is that you execute the script via 'sh':

$ sh ./p4est-setup.sh p4est-1.1.tar.gz

You need to execute it with 'bash' instead, i.e., you need to say

$ bash ./p4est-setup.sh p4est-1.1.tar.gz

or just say this:

$ ./p4est-setup.sh p4est-1.1.tar.gz


Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@math.tamu.edu
www: http://www.math.tamu.edu/~bangerth/

D. Sarah Stamps

unread,
Jul 28, 2015, 3:34:20 PM7/28/15
to deal.II User Group, qiao...@gmail.com
I am having the same issue as Lev. What is the end of the command:

"CC=mpicc ./configure --??" 

Thanks,

DSS

Bruno Turcksin

unread,
Jul 28, 2015, 3:49:59 PM7/28/15
to deal.II User Group, qiao...@gmail.com, stamps...@gmail.com

On Tuesday, July 28, 2015 at 2:34:20 PM UTC-5, D. Sarah Stamps wrote:
I am having the same issue as Lev. What is the end of the command:

"CC=mpicc ./configure --??" 

You can just do:

export CC=mpicc

and then run the setup script normally.

Best,

Bruno

D. Sarah Stamps

unread,
Jul 28, 2015, 4:06:18 PM7/28/15
to deal.II User Group, qiao...@gmail.com, bruno.t...@gmail.com
Hmm, still the same issue. Attached is my config.log file. Can you see any issues?

Thank you,

DSS 
config.log

Bruno Turcksin

unread,
Jul 28, 2015, 4:25:41 PM7/28/15
to D. Sarah Stamps, deal.II User Group, qiaol618


On 07/28/2015 03:06 PM, D. Sarah Stamps wrote:
> Hmm, still the same issue. Attached is my config.log file. Can you see
> any issues?
For some reason CC still uses gcc instead of mpicc. Are you sure there
was no typo? Do you do export CC=mpicc and then, in the same terminal
run the setup script? What do you get when you type in the terminal:

echo ${SHELL}

Bruno

D. Sarah Stamps

unread,
Jul 28, 2015, 4:34:32 PM7/28/15
to deal.II User Group, qiao...@gmail.com, bruno.t...@gmail.com
I'm running bash. I tried setting CC to mpicc in my .bashrc, but still no luck. i.e. echo $CC gives me: 

/opt/apps/gcc4_7/mvapich2/1.9a2/bin/mpicc

Is there a recommended place to change the install script to force the correct compilers? 

Thank you. 

Bruno Turcksin

unread,
Jul 28, 2015, 4:44:02 PM7/28/15
to D. Sarah Stamps, deal.II User Group, qiao...@gmail.com
You could try to delete the p4est-build directory or any other p4est
directory except for the tarball. Maybe some variable where cached.

On 07/28/2015 03:34 PM, D. Sarah Stamps wrote:
> I'm running bash. I tried setting CC to mpicc in my .bashrc, but still
> no luck. i.e. echo $CC gives me:
>
> /opt/apps/gcc4_7/mvapich2/1.9a2/bin/mpicc
>
> Is there a recommended place to change the install script to force the
> correct compilers?
The script does nothing exceptional, you can configure p4est yourself using:

./configure --enable-mpi --enable-shared --disable-vtk-binary
--without-blas --prefix=/home/dstamps/packages/p4est CC=mpicc CFLAGS=-O2

then just type make install

Bruno

D. Sarah Stamps

unread,
Jul 28, 2015, 4:59:56 PM7/28/15
to deal.II User Group, qiao...@gmail.com, bruno.t...@gmail.com
Thank you. p4est configured and compiled. 

I had to also explicitly set CXX=mpicxx. In the end I configured p4est with: 

./configure --enable-mpi --enable-shared --disable-vtk-binary --without-blas --prefix=/home/dstamps/packages/p4est CC=mpicc CFLAGS=-O2  CXX=mpicxx

fea...@gmail.com

unread,
Nov 27, 2017, 10:51:10 PM11/27/17
to deal.II User Group
Dear all,

I also get a bug when I install  p4est
Error: Main header file missing

How can I solve this bugs in the installation of p4est?

Warm regards,
Yaakov

Wolfgang Bangerth

unread,
Nov 28, 2017, 12:04:19 AM11/28/17
to dea...@googlegroups.com
On 11/27/2017 08:51 PM, fea...@gmail.com wrote:
>
> I also get a bug when I install p4est
> *Error: Main header file missing
> *
> How can I solve this bugs in the installation of p4est?

That is not enough information for us to tell you what the problem may be. Can
you elaborate?

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

FEAPMAN Yaakov

unread,
Dec 1, 2017, 3:08:55 AM12/1/17
to dea...@googlegroups.com
Dear Prof. Bangerth,

I used follwing command in terminal, and get an error report

bash ./p4est-setup.sh p4est-1.1.tar.gz /home/feapman/Program/p4est-develop
CFLAGS_FAST: -O2
CFLAGS_DEBUG: -O0 -g

This script tries to unpack, configure and build the p4est library.
Build FAST: /home/feapman/Program/p4est-build/FAST
Build DEBUG: /home/feapman/Program/p4est-build/DEBUG
Install FAST: /home/feapman/Program/p4est-develop/FAST
Install DEBUG: /home/feapman/Program/p4est-develop/DEBUG
Checking environment: CFLAGS P4EST_CFLAGS_FAST P4EST_CFLAGS_DEBUG
Unpack directory: /home/feapman/Program/p4est-1.1
Source directory found (remove it to unpack anew)

Error: Main header file missing


Actually,  I really need plug-in p4est as I have to use it for a used defined benchmark in Deal.II. Still Now, I have no idea how to install it.

Warm regards,
Yaakov

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/2Uf6V660JtA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+unsubscribe@googlegroups.com.

Daniel Arndt

unread,
Dec 1, 2017, 3:32:32 AM12/1/17
to deal.II User Group
Yaakov,

looking at p4est-install.sh, the error tells you that "SRCDIR/src/p4est.h" can't be found.
This might mean that your p4est-1.1.tar.gz is broken or incomplete.
Can you make sure that "src/p4est.sh" indeed exists after unpacking the archive?
If not, try to download p4est-1.1.tar.gz again.

Best,
Daniel
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.

fea...@gmail.com

unread,
Dec 1, 2017, 8:26:02 AM12/1/17
to deal.II User Group
Hi Daniel,

Now this problem is solved. I would like to ask why I get two orders.

one is defined order p4est
new one is p4est-build

Warm regards,
Yaakov

Bruno Turcksin

unread,
Dec 1, 2017, 9:03:29 AM12/1/17
to dea...@googlegroups.com
Yaakov,

2017-12-01 8:26 GMT-05:00 <fea...@gmail.com>:
one is defined order p4est
new one is p4est-build
p4est: directory where you wanted to install p4est
p4est-build: directory where p4est is compiled. This can be removed once p4est is installed.
It is common when you install a library to have three directories: source directory, build directory, and install directory

Best,

Bruno

fea...@gmail.com

unread,
Dec 1, 2017, 7:11:27 PM12/1/17
to deal.II User Group
Hi Bruno & DEAL.ii Team,

many thanks for your suggestion & help!

now I install p4est in a new order which contains three directories: source directory, build directory, and install directory

Warm regards,
Yaakov

Mark Ma

unread,
Mar 11, 2019, 9:37:30 AM3/11/19
to deal.II User Group
Thanks Bruno, it works for my case in a supercomputer.
For some clusters, use module load xxxx before compiling.

To buid the p4est, edit in p4est-setup.sh to add
1. module load xxxx
2. export CC=mpicc, CXX=mpicxx

then use bash ./p4est-setup.sh p4est-x.x.tar.gz install_locations

Mark

在 2015年7月28日星期二 UTC+2下午10:25:41,Bruno Turcksin写道:
Reply all
Reply to author
Forward
0 new messages