Update to PETSc

289 views
Skip to first unread message

Hammond, Glenn E

unread,
Mar 30, 2017, 1:02:20 AM3/30/17
to pflotra...@googlegroups.com, pflotr...@googlegroups.com
All,

I have updated the version of PETSc against which PFLOTRAN will compile. If you pull the latest source code, you will need to update PETSc as follows:

cd $PETSC_DIR
git pull
git checkout xsdk-0.2.0

reconfigure and compile PETSc according to the online instructions.

http://documentation.pflotran.org/user_guide/how_to/installation/linux.html#linux-install

Those perusing the code will notice that the interface with PETSc now differs in the source code. Many PETSc Fortran header files (e.g. #include "petsc/finclude/petscvec.h/h90") have been replaced with Fortran modules (use petscvec). The switch allows us to maintain more control on interfaces and catch additional programming errors. For the past several weeks, I have been maintaining two versions of the code, but now we have to move on. There should be little to no effect on users, but developers will have to adopt the new approach to PETSc header files/modules.

Glenn

Peter Lichtner

unread,
Mar 30, 2017, 12:01:36 PM3/30/17
to pflotr...@googlegroups.com, pflotra...@googlegroups.com
New version running fine on MacOSX El Capitan. If someone has Sierra installed would be interested to hear if that works too.
…Peter
> --
> You received this message because you are subscribed to the Google Groups "pflotran-dev" group.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pflotran-dev/fa2c1805c45d4346a9813eb29c9d35e4%40ES06AMSNLNT.srn.sandia.gov.

Joan Govaerts

unread,
May 17, 2017, 5:10:17 PM5/17/17
to pflotran-users, pflotr...@googlegroups.com
I have issues trying to install pf on sierra.  

should I continue trying ?

Op donderdag 30 maart 2017 18:01:36 UTC+2 schreef Peter Lichtner:

Hammond, Glenn E

unread,
May 17, 2017, 7:04:14 PM5/17/17
to pflotr...@googlegroups.com, pflotran-users

Joan,

 

Please send $PETSC_DIR/$PETSC_ARCH/lib/petsc/conf/[configure,make].log to pflotran-dev (not petsc-users) if PETSc is not compiling properly.  Otherwise, please send the screen output from the PFLOTRAN compilation.  We need more information.

 

Thanks,

 

Glenn

 

joan.g...@gmail.com

unread,
May 18, 2017, 7:29:49 AM5/18/17
to pflotran-dev, pflotra...@googlegroups.com, geh...@sandia.gov
Dear Glenn,

Thanks for your answer. In the meantime I succeeded to install pflotran. The main issue was the PETSC compilation, as I had problems with the fortran compiler ("C libraries cannot directly be used from Fortran").

I performed the regression tests, however 11 failed, not sure if this is a problem.

Kind regards
Joan


Op donderdag 18 mei 2017 01:04:14 UTC+2 schreef Hammond, Glenn E:

Hammond, Glenn E

unread,
May 18, 2017, 9:23:02 AM5/18/17
to joan.g...@gmail.com, pflotran-dev, pflotra...@googlegroups.com
I expect several (~10) regression tests to fail on the Mac due to difference in OS. The tests' gold files were generated with Ubuntu.

Glenn

yijian zeng

unread,
May 19, 2017, 9:50:41 AM5/19/17
to pflotran-dev, pflotra...@googlegroups.com, geh...@sandia.gov, joan.g...@gmail.com
Dear Joan,
I have the PETSC compilation problem, with following error message:

"gfortran: internal compiler error: Killed (program f951)”

Do you have any idea on how to solve it?

Many thanks,
Yijian

Hammond, Glenn E

unread,
May 19, 2017, 9:52:42 AM5/19/17
to yijian zeng, pflotran-dev, pflotra...@googlegroups.com, joan.g...@gmail.com
If one of you will provide some notes on how to resolve this issue, we will add them to our FAQ.

Glenn

yijian zeng

unread,
May 19, 2017, 9:56:29 AM5/19/17
to pflotran-dev, yijia...@gmail.com, pflotra...@googlegroups.com, joan.g...@gmail.com, geh...@sandia.gov
Glenn,
I just got feedback from Matthew Knepley from PETSC, who recommended to update gfortran, and mentioned that it exposed a bug in gfortran.

I will try to update gfortran, however, not yet sure how to do that. Will googling, but perhaps you already have some suggestion on how to update gfortran?

Best,
YIJIAN

Joan Govaerts

unread,
May 19, 2017, 10:19:49 AM5/19/17
to yijian zeng, pflotran-dev, pflotra...@googlegroups.com, geh...@sandia.gov
Hello,

In my case, it was the gfortran I installed, which did not get along with the native OS c compiler (clang).

I removed the gfortran. 
Then I used Homebrew to install the gcc (which includes gfortran), more or less following these guidelines: http://www.underworldcode.org/posts/MacOS_Sierra 

then I was able to compile PETSC with

sudo ./configure --download-mpich=yes --download-hdf5=yes --download-fblaslapack=yes --download-metis=yes --download-parmetis=yes --download-cmake

I then used this method to set the environment variables: https://support.shotgunsoftware.com/hc/en-us/articles/219042108-Setting-global-environment-variables-on-OS-X

As I am not an expert on compiling on mac, I am not sure if this is the best way to do it, but in the end it worked.

Any suggestions are welcome.


Kind regards

Joan






yijian zeng

unread,
May 21, 2017, 3:11:46 PM5/21/17
to pflotran-users, yijia...@gmail.com, pflotr...@googlegroups.com, geh...@sandia.gov
Hello, Joan, Glenn,
I solved the problem. It was about the version of gfortran i installed. When i update it to gfotran-7, it works perfectly fine.

For "make test", i got 4 failed.

Many thanks,
Yijian

mickey...@gmail.com

unread,
Mar 29, 2018, 4:15:38 PM3/29/18
to pflotran-users
Hi Joan, 
How did you solve the PETSC compilation problem? I'm having the same error on Sierra. 

Thanks! 
Reply all
Reply to author
Forward
Message has been deleted
0 new messages