Error determining PETSC version

242 views
Skip to first unread message

James B Tompkins

unread,
Jan 7, 2015, 10:45:27 AM1/7/15
to moose...@googlegroups.com
Trying to do a fresh moose install on Ubuntu 14.04, and I'm having issues testing the install.  When running 'make -j8' I get various errors associated with petsc functions, and when attempting to run the tests I get "Error determining PETSC version."  I have tried using the Redistributable Package as well as the manual PETSC installation, but both return the same error at the testing stage.  Any help would be much appreciated. 

Peterson, JW

unread,
Jan 7, 2015, 10:52:35 AM1/7/15
to moose-users
It sounds like libmesh got built without Petsc enabled. I'm not
exactly sure how that could have happened, but we'll know more if you
can send us your config.log file. It should be in
$MOOSE_DIR/libmesh/build/config.log, where $MOOSE_DIR is the location
of your github checkout of MOOSE.

--
John

James B. Tompkins

unread,
Jan 7, 2015, 10:56:15 AM1/7/15
to moose...@googlegroups.com
Sorry about that.  The file is attached.


--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/_k2ml31vFgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/CANj%2BmwAt9ei4w1LUvv1P85zBk6eFrN%3D%3DP7xYRVS5EW7sYwWW5Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
James B. Tompkins | Graduate Research Assistant
Department of Nuclear Engineering | Texas A&M University
3133 TAMU | College Station, TX 77843
Nuclear Science Center | Texas Engineering Experiment Station
1095 Nuclear Science Road | College Station, TX 77843

ph: 979.845.7551 | mobile: 214.549.6174 | tomp...@tamu.edu | Zachary 60E
config.log

Cody Permann

unread,
Jan 7, 2015, 11:17:26 AM1/7/15
to moose...@googlegroups.com
John is correct, You can see from the config.log that libMesh is unable to find PETSc. There are a couple of things wrong here. It appears that you aren't using our environment or our "update_and_rebuild_libmesh.sh" script. Why are you overriding the values of CC and CXX? 

Make sure that you are sourcing the moose_profile so that the necessary libraries and compilers are setup correctly on your system. (See the Post Install step http://mooseframework.org/getting-started/ubuntu-1404/)

After starting a new terminal, run $MOOSE_DIR/scripts/update_and_rebuild_libmesh.sh and you should be good to go.

Let us know if you continue to run into problems.
Cody

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.

Peterson, JW

unread,
Jan 7, 2015, 11:24:22 AM1/7/15
to moose-users
On Wed, Jan 7, 2015 at 9:17 AM, Cody Permann <codyp...@gmail.com> wrote:
> John is correct, You can see from the config.log that libMesh is unable to
> find PETSc. There are a couple of things wrong here. It appears that you
> aren't using our environment or our "update_and_rebuild_libmesh.sh" script.
> Why are you overriding the values of CC and CXX?

Right, the lines Cody is referring to in config.log are:

configure:29464: checking /include/petscversion.h usability
configure:29464: gcc -c conftest.c >&5
conftest.c:131:35: fatal error: /include/petscversion.h: No such file
or directory

This means that the environment variable $PETSC_DIR is not set. Which
leads to Cody's next point:

> Make sure that you are sourcing the moose_profile so that the necessary
> libraries and compilers are setup correctly on your system. (See the Post
> Install step http://mooseframework.org/getting-started/ubuntu-1404/)

Loading the proper moose-dev module is what sets $PETSC_DIR.

--
John

James B. Tompkins

unread,
Jan 7, 2015, 11:57:13 AM1/7/15
to moose...@googlegroups.com
I had added the source moose environment lines to my .bashrc file, closed all terminals then opened a new one and ran the /scripts/update_and_rebuild_libmesh.sh script after following the instructions provided for Ubuntu 14.04.  The following modules were loaded:

moose/.openmpi-1.8.1_gcc
moose/.openmpi_petsc-3.5.1-gcc
moose/.cppunit-gcc
moose-dev-gcc
moose-tools

When I received the PETSC version error, I decided to try the manual installation instructions (http://mooseframework.org/wiki/BasicManualInstallation/Linux/) and removed all moose directories (~projects/moose/ as well as /opts/moose/) created from the redistributable method.  Following the manual installation instructions, I again got the PETSC version error (I think this is how the CC and CXX values were overridden).  Before contacting the group, I removed manual install files and tried the Ubuntu 14.04 instructions again with the same results.



--
John

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/_k2ml31vFgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.
Visit this group at http://groups.google.com/group/moose-users.

For more options, visit https://groups.google.com/d/optout.

James B. Tompkins

unread,
Jan 7, 2015, 12:11:46 PM1/7/15
to moose...@googlegroups.com
I did not have cmake the first time I tried to go through the Ubuntu 14.04 instructions (it is not mentioned in the Ubuntu instructions, but the manual installation instructions mention it is required to build petsc).  I only obtained cmake after going through the manual installation.  Could this be part of the problem?

Derek Gaston

unread,
Jan 7, 2015, 12:18:53 PM1/7/15
to moose...@googlegroups.com
To figure this out it will be best if you go back to the redistributable.  Too many variables in a manual setup.

Can you very meticulously go back through the Getting Started instructions here: http://mooseframework.org/getting-started/ubuntu-1404/

Then, when it doesn't work again can you do a:

env > enviro.txt

And email the enviro.txt file that gets created to us?

Sorry your having trouble - let's get it figured out!

Derek

To unsubscribe from this group and all its topics, send an email to moose-users+unsubscribe@googlegroups.com.
--
James B. Tompkins | Graduate Research Assistant
Department of Nuclear Engineering | Texas A&M University
3133 TAMU | College Station, TX 77843
Nuclear Science Center | Texas Engineering Experiment Station
1095 Nuclear Science Road | College Station, TX 77843

ph: 979.845.7551 | mobile: 214.549.6174 | tomp...@tamu.edu | Zachary 60E



--
James B. Tompkins | Graduate Research Assistant
Department of Nuclear Engineering | Texas A&M University
3133 TAMU | College Station, TX 77843
Nuclear Science Center | Texas Engineering Experiment Station
1095 Nuclear Science Road | College Station, TX 77843

ph: 979.845.7551 | mobile: 214.549.6174 | tomp...@tamu.edu | Zachary 60E

--
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+unsubscribe@googlegroups.com.

James B. Tompkins

unread,
Jan 7, 2015, 12:32:26 PM1/7/15
to moose...@googlegroups.com
Attached is the file requested.

To unsubscribe from this group and all its topics, send an email to moose-users...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
enviro.txt

Miller, Jason M

unread,
Jan 7, 2015, 12:38:44 PM1/7/15
to moose...@googlegroups.com
That environment looks fine to me.
Can you run through the update_and_rebuild_libmesh.sh script again and send the libmesh config log?

Thanks!
Jason Miller

To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.

James B. Tompkins

unread,
Jan 7, 2015, 12:40:03 PM1/7/15
to moose...@googlegroups.com
config.log

Miller, Jason M

unread,
Jan 7, 2015, 1:14:07 PM1/7/15
to moose...@googlegroups.com
This is very odd to me, as your env looks fine, but your libmesh look contains nothing about any of that 'fine' environment :/

Can you verify, that before you run the update_and_rebuild_libmesh.sh script, that the following prints out something:

echo $PETSC_DIR





James B. Tompkins

unread,
Jan 7, 2015, 1:15:57 PM1/7/15
to moose...@googlegroups.com
Yes, it returns the directory listed in the env (/opt/moose/petsc/openmpi_petsc-3.5.1/gcc-opt).


For more options, visit https://groups.google.com/d/optout.

Miller, Jason M

unread,
Jan 7, 2015, 1:23:24 PM1/7/15
to moose...@googlegroups.com
Is your default shell bash?

echo $0

And in which profile did you use to add the commands to source the /opt/moose/environments/moose_profile (.bash_profile, .profile, etc)




James B. Tompkins

unread,
Jan 7, 2015, 1:33:05 PM1/7/15
to moose...@googlegroups.com
Yes, the default shell is bash.  I added the lines to the ~/.bashrc file in my home directory (/home/james/) by editing the file in Vi and saving after pasting the lines in the file.


For more options, visit https://groups.google.com/d/optout.

Miller, Jason M

unread,
Jan 7, 2015, 2:16:52 PM1/7/15
to moose...@googlegroups.com
Well... if the results of `env` are spot on (which they seem to be), and you attempt to build libmesh via that script, using the same terminal in which you just verified `env`, echo $PETSC_DIR and all that are returning the correct stuff... I am pretty much out of ideas. The only thing that would prevent the immediate environment from not being used when running a command, would be through the use of sudo or some such (which you should not be doing to build libMesh).

We can skip using the update_abd_rebuild_libmesh.sh script all together, just to see if indeed, configure is not picking up PETSC_DIR.

echo $PETSCH_DIR  # :) just for good measure!

mkdir /home/james/projects/moose/libmesh/testing
cd /home/james/projects/moose/libmesh/testing
../configure --with-methods="opt" \
             --prefix=/home/james/projects/moose/libmesh/testing-install \
             --enable-silent-rules \
             --enable-unique-id \
             --disable-warnings \
             --disable-cxx11 \
             --enable-openmp



lets see what the above does...?






James B. Tompkins

unread,
Jan 7, 2015, 2:48:10 PM1/7/15
to moose...@googlegroups.com
Well, I think we have cornered the issue.  I was using sudo to run the script because without it, the script cannot write to /usr/bin/install. 


For more options, visit https://groups.google.com/d/optout.

Cody Permann

unread,
Jan 7, 2015, 3:02:25 PM1/7/15
to moose...@googlegroups.com
You only need "sudo" if you are installing to a location where you don't have permissions which we don't require. You certainly don't write to "/usr/bin/install", that's a program. You should be able to run the script without elevated permissions.

Cody

Derek Gaston

unread,
Jan 7, 2015, 3:06:06 PM1/7/15
to moose...@googlegroups.com
What script can't write to /usr/bin/install?  None of our scripts try to do that.

You should install the redistributable package using sudo (like the instructions say)... but everything else is done just as your regular user in your home directory (just copy and paste the commands from here: http://mooseframework.org/getting-started/ )

Derek


James B. Tompkins

unread,
Jan 7, 2015, 3:06:24 PM1/7/15
to moose...@googlegroups.com
Sorry, I'm a bit rusty with linux.  When I ran the script without sudo, the terminal reported that it didn't have permissions to /usr/bin/install and terminated the libmesh build. 


For more options, visit https://groups.google.com/d/optout.

Cody Permann

unread,
Jan 7, 2015, 3:09:27 PM1/7/15
to moose...@googlegroups.com
Not quite, you do have access to run "/usr/bin/install", but youl may not have permissions to write to the location it's attempting to write. I believe the only way that would happen is if you set your LIBMESH_DIR to a location where you don't have write permission. We do not require that you set LIBMESH_DIR at all.

Cody

James B. Tompkins

unread,
Jan 7, 2015, 3:09:36 PM1/7/15
to moose...@googlegroups.com
It was the update_and_rebuild_libmesh.sh script that was having issues with permissions.  Let me check again after Jason's fix finishes running, but just before running it, I tried running the update libmesh script unelevated and it was still having permissions issues.

Andrs, David

unread,
Jan 7, 2015, 3:10:21 PM1/7/15
to moose...@googlegroups.com
ls -l /usr/bin/install ?

James B. Tompkins

unread,
Jan 7, 2015, 3:26:18 PM1/7/15
to moose...@googlegroups.com
Alright, got it fixed.  Thanks for the help everyone!


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages