[petsc-users] Troubles installing PETSc

Matthew Knepley knepley at gmail.com
Wed Nov 20 20:26:08 CST 2013


On Wed, Nov 20, 2013 at 8:01 PM, Justin Dong (Me) <jsd1 at rice.edu> wrote:

> Hi Matt,
>
> I’ve checked out the section on makefiles and am not really sure what I
> could be doing incorrectly. I’m positive $PETSC_DIR is set correctly. I’m
> on MAC OS X 10.9 right now and have $PETSC_ARCH set as linux-gnu.
>
> According to the example I linked to below, I should just type “make ex2”,
> which gives me the error I listed. In the user manual, I try the suggestion
> “make PETSC_ARCH=arch ex2” with arch replaced by linux-gnu and I still get
> the same error. I haven’t messed with the makefile at all, and if I’ve set
> $PETSC_DIR and $PETSC_ARCH correctly, it should be fine, right?
>

Either it does not see your makefile in that directory or something is
wrong with the makefile. The simplest makefile is

ex2: ex2.o
      ${CLINKER} -o ex2 ex2.o ${PETSC_LIB}

include ${PETSC_DIR}/${PETSC_ARCH}/conf/variables
include ${PETSC_DIR}/${PETSC_ARCH}/conf/rules



   Matt


> Any other tips?
>
> Thanks,
> Justin
>
> On Nov 20, 2013, at 6:51 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Wed, Nov 20, 2013 at 6:48 PM, Justin Dong (Me) <jsd1 at rice.edu> wrote:
>
>> Hi all,
>>
>> I’ve just installed PETSc and it seems that I don’t get any errors. I
>> type “make” from the command line and this is the end bit of the result:
>>
>> ==========================================
>> Building PETSc using CMake with 5 build threads
>> ==========================================
>> Re-run cmake file: Makefile older than: ../CMakeLists.txt
>> -- Configuring done
>> -- Generating done
>> -- Build files have been written to:
>> /Users/[…]/Classes/CAAMResearch/petsc-3.4.3/arch-darwin-c-debug
>> [100%] Built target petsc
>> Running /usr/bin/dsymutil on libpetsc
>> =========================================
>> Now to check if the libraries are working do:
>> make PETSC_DIR=/Users/[…]/Classes/CAAMResearch/petsc-3.4.3
>> PETSC_ARCH=arch-darwin-c-debug test
>>
>>
>> and if I run the command it tells me to after that, I get:
>>
>> C/C++ example src/snes/examples/tutorials/ex19 run successfully with 1
>> MPI process
>> C/C++ example src/snes/examples/tutorials/ex19 run successfully with 2
>> MPI processes
>> Fortran example src/snes/examples/tutorials/ex5f run successfully with 1
>> MPI process
>> Completed test examples
>>
>>
>> I try this example (
>> http://www.mcs.anl.gov/petsc/documentation/exercises/compiling/index.html)
>> and get this error:
>>
>> cc     ex2.c   -o ex2
>> *ex2.c:13:10: **fatal error: **'petscsys.h' file not found*
>> #include <petscsys.h>
>> *         ^*
>> 1 error generated.
>> make: *** [ex2] Error
>>
>>
> There is a chapter in the manual on using PETSc makefiles
>
>   Thanks
>
>     Matt
>
>
>> I’m working in the PETSc directory so I don’t think it’s an issue with
>> setting the path, but I’m not that great at all of the architecture stuff.
>> If anyone can assist, I’d be grateful.
>>
>> Thanks,
>> Justin
>>
>
>
>
> --
> What most experimenters take for granted before they begin their
> experiments is infinitely more interesting than any results to which their
> experiments lead.
> -- Norbert Wiener
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131120/95112072/attachment.html>


More information about the petsc-users mailing list