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?

Any other tips?

Thanks,
Justin

On Nov 20, 2013, at 6:51 PM, Matthew Knepley <[email protected]> wrote:

> On Wed, Nov 20, 2013 at 6:48 PM, Justin Dong (Me) <[email protected]> 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

Reply via email to