Error while install MOOSE - PETSc has not been detected

323 views
Skip to first unread message

Abhi Kumar

unread,
Jun 26, 2016, 8:53:02 AM6/26/16
to moose-users
Hi All, 

I am trying to  install MOOSE on HPC cluster.  I have followed the steps mentioned in GETTING Started section by pulling and compiling libMesh. After successful compilation, I am doing make in /moose/test/ directory as mentioned. I tried "make" many times after deleting and recompiling libMesh but every time I am getting the same error. 

abhishek@udbhav:~/Desktop/projectmoose/project/moose/test> make
MOOSE Compiling C++ (in opt mode) /home/abhishek/Desktop/projectmoose/project/moose/framework/src/predictors/AdamsPredictor.C...
In file included from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/MooseError.h(18),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/utils/InputParameters.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/MooseObject.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/predictors/Predictor.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/predictors/AdamsPredictor.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/src/predictors/AdamsPredictor.C(15):
/home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/Moose.h(134): error: identifier "MPI_Comm" is undefined
  MPI_Comm swapLibMeshComm(MPI_Comm new_comm);
  ^

In file included from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/MooseError.h(18),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/utils/InputParameters.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/MooseObject.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/predictors/Predictor.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/predictors/AdamsPredictor.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/src/predictors/AdamsPredictor.C(15):
/home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/Moose.h(134): error: identifier "MPI_Comm" is undefined
  MPI_Comm swapLibMeshComm(MPI_Comm new_comm);
                           ^

In file included from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/MooseError.h(18),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/utils/InputParameters.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/MooseObject.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/predictors/Predictor.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/include/predictors/AdamsPredictor.h(19),
                 from /home/abhishek/Desktop/projectmoose/project/moose/framework/src/predictors/AdamsPredictor.C(15):
/home/abhishek/Desktop/projectmoose/project/moose/framework/include/base/Moose.h(140): catastrophic error: #error directive: PETSc has not been detected, please ensure your environment is set up properly then rerun the libmesh build script and try to compile MOOSE again.
    #error PETSc has not been detected, please ensure your environment is set up properly then rerun the libmesh build script and try to compile MOOSE again.
     ^

compilation aborted for /home/abhishek/Desktop/projectmoose/project/moose/framework/src/predictors/AdamsPredictor.C (code 4)
make: *** [/home/abhishek/Desktop/projectmoose/project/moose/framework/src/predictors/AdamsPredictor.x86_64-unknown-linux-gnu.opt.lo] Error 1


I have set the PETSC_DIR too as shown below:

abhishek@udbhav:~/Desktop/projectmoose/project/moose/test> echo $PETSC_DIR
/home/abhishek/Desktop/projectmoose/pet6/arch-linux2-c-opt/


Can you people please help me through this. BTW I could successfully compile and install MOOSE on my Desktop. 

Regards,

Abhishek

Kong (Non-US), Fande

unread,
Jun 27, 2016, 9:54:16 AM6/27/16
to moose...@googlegroups.com
Hi Abhi,

You should set the PETSc environment as follows:

export PETSC_DIR=/home/abhishek/Desktop/projectmoose/pet6
export PETSC_ARCH=arch-linux2-c-opt

Fande Kong,



--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/bc33882a-ba9f-4325-84eb-8c3dad6e51da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peterson, JW

unread,
Jun 27, 2016, 10:49:10 AM6/27/16
to moose-users
On Mon, Jun 27, 2016 at 7:54 AM, Kong (Non-US), Fande <fande...@inl.gov> wrote:
Hi Abhi,

You should set the PETSc environment as follows:

export PETSC_DIR=/home/abhishek/Desktop/projectmoose/pet6
export PETSC_ARCH=arch-linux2-c-opt

The problem goes a bit deeper than just needing to set environment variables. 

You will also have to rebuild libmesh and make sure that it detects PETSc properly at configure time.  If it still doesn't work, you can send your config.log file in to the mailing list and we can take a closer look.  By the way, we are planning to add an --enable-petsc-required flag to libmesh that MOOSE will then use... this will stop the configure process when PETSc is not detected, rather than letting you get all the way to the step of building MOOSE and having a failure.

--
John

Abhi Kumar

unread,
Jul 10, 2016, 5:50:11 AM7/10/16
to moose-users
Thanks Kong and John, I am able to install moose by reinstalling all the libraries. Thanks once again !
Reply all
Reply to author
Forward
0 new messages