[petsc-users] missing libpetsc.a
I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120906/93fb23f9/attachment.html
[petsc-users] missing libpetsc.a
You need to link to all of the libraries. At the petsc top directory issue: make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs That'll give you all the libraries that need to be linked to the executable On Thu, Sep 6, 2012 at 12:23 AM, 0sabio00 at gmail.com wrote: I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120906/227f66b5/attachment.html
[petsc-users] missing libpetsc.a
The routine is spelled DMCreateMatrix() On Sep 6, 2012 12:23 AM, 0sabio00 at gmail.com wrote: I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120906/8fdb0ce0/attachment.html
[petsc-users] missing libpetsc.a
I tried make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs and it printed out -Wl, -rpath, /PETSC_DIR/PETSC_ARCH/lib -L//PETSC_DIR/PETSC_ARCH/lib -lpetsc -lpthread -Wl -rpath, /PETSC_DIR/PETSC_ARCH/lib -lflapack -lfblas -lm -L/usr/lib/gcc/i486-linux-gnu/4.4.5 -L/usr/lib/i486-linux-gru -lmpichf90 -lgfortran -lm -lm -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl I gor rid of all ',' and used the flag above and it had error with -Wl and -rpath flags gcc: unrecognized option -rpath cclplus: error : unrecognized command line option -Wl so i got rid of those two flags and compiled and I still get the same error with DMGetMatrix not being declared. I checked the location of all the libraries listed above. (with find -name lib'blahblah'.*) at / But There was no library for petsc libpetsc.* anywhere. Am I missing something?? Thank you On Thu, Sep 6, 2012 at 6:28 AM, Jed Brown jedbrown at mcs.anl.gov wrote: The routine is spelled DMCreateMatrix() On Sep 6, 2012 12:23 AM, 0sabio00 at gmail.com wrote: I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120906/fbd39016/attachment.html
[petsc-users] missing libpetsc.a
On Thu, Sep 6, 2012 at 10:29 AM, 0sabio00 at gmail.com wrote: I tried make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs and it printed out -Wl, -rpath, /PETSC_DIR/PETSC_ARCH/lib -L//PETSC_DIR/PETSC_ARCH/lib -lpetsc -lpthread -Wl -rpath, /PETSC_DIR/PETSC_ARCH/lib -lflapack -lfblas -lm -L/usr/lib/gcc/i486-linux-gnu/4.4.5 -L/usr/lib/i486-linux-gru -lmpichf90 -lgfortran -lm -lm -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl I gor rid of all ',' and used the flag above and it had error with -Wl and -rpath flags Why did you do that? These commas are meaningful. See the gcc manual. Matt gcc: unrecognized option -rpath cclplus: error : unrecognized command line option -Wl so i got rid of those two flags and compiled and I still get the same error with DMGetMatrix not being declared. I checked the location of all the libraries listed above. (with find -name lib'blahblah'.*) at / But There was no library for petsc libpetsc.* anywhere. Am I missing something?? Thank you On Thu, Sep 6, 2012 at 6:28 AM, Jed Brown jedbrown at mcs.anl.gov wrote: The routine is spelled DMCreateMatrix() On Sep 6, 2012 12:23 AM, 0sabio00 at gmail.com wrote: I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks -- 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/20120906/1120fcf3/attachment.html
[petsc-users] missing libpetsc.a
Also first confirm 'make test' works for this build of petsc. Satish On Thu, 6 Sep 2012, Matthew Knepley wrote: On Thu, Sep 6, 2012 at 10:29 AM, 0sabio00 at gmail.com wrote: I tried make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs and it printed out -Wl, -rpath, /PETSC_DIR/PETSC_ARCH/lib -L//PETSC_DIR/PETSC_ARCH/lib -lpetsc -lpthread -Wl -rpath, /PETSC_DIR/PETSC_ARCH/lib -lflapack -lfblas -lm -L/usr/lib/gcc/i486-linux-gnu/4.4.5 -L/usr/lib/i486-linux-gru -lmpichf90 -lgfortran -lm -lm -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl I gor rid of all ',' and used the flag above and it had error with -Wl and -rpath flags Why did you do that? These commas are meaningful. See the gcc manual. Matt gcc: unrecognized option -rpath cclplus: error : unrecognized command line option -Wl so i got rid of those two flags and compiled and I still get the same error with DMGetMatrix not being declared. I checked the location of all the libraries listed above. (with find -name lib'blahblah'.*) at / But There was no library for petsc libpetsc.* anywhere. Am I missing something?? Thank you On Thu, Sep 6, 2012 at 6:28 AM, Jed Brown jedbrown at mcs.anl.gov wrote: The routine is spelled DMCreateMatrix() On Sep 6, 2012 12:23 AM, 0sabio00 at gmail.com wrote: I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks
[petsc-users] missing libpetsc.a
I tried with given flag and it still gave me an error ( cannot find -lpetsc ) When I did make test I got an error /usr/bin/ld : cannot find -lpetsc Thank you On Thu, Sep 6, 2012 at 12:25 PM, Satish Balay balay at mcs.anl.gov wrote: Also first confirm 'make test' works for this build of petsc. Satish On Thu, 6 Sep 2012, Matthew Knepley wrote: On Thu, Sep 6, 2012 at 10:29 AM, 0sabio00 at gmail.com wrote: I tried make PETSC_DIR=$PWD PETSC_ARCH=arch-linux2-c-debug getlinklibs and it printed out -Wl, -rpath, /PETSC_DIR/PETSC_ARCH/lib -L//PETSC_DIR/PETSC_ARCH/lib -lpetsc -lpthread -Wl -rpath, /PETSC_DIR/PETSC_ARCH/lib -lflapack -lfblas -lm -L/usr/lib/gcc/i486-linux-gnu/4.4.5 -L/usr/lib/i486-linux-gru -lmpichf90 -lgfortran -lm -lm -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl I gor rid of all ',' and used the flag above and it had error with -Wl and -rpath flags Why did you do that? These commas are meaningful. See the gcc manual. Matt gcc: unrecognized option -rpath cclplus: error : unrecognized command line option -Wl so i got rid of those two flags and compiled and I still get the same error with DMGetMatrix not being declared. I checked the location of all the libraries listed above. (with find -name lib'blahblah'.*) at / But There was no library for petsc libpetsc.* anywhere. Am I missing something?? Thank you On Thu, Sep 6, 2012 at 6:28 AM, Jed Brown jedbrown at mcs.anl.gov wrote: The routine is spelled DMCreateMatrix() On Sep 6, 2012 12:23 AM, 0sabio00 at gmail.com wrote: I think i'm having a trouble linking to the petsc library. gcc main.cpp -I /path to /petsc-3.3-p3/include -I /path to/petsc-3.3-p3/arch-linux2-c-debug/include -L/path to /petsc-3.3-p3/arch-linux2-c-debug/lib/ -lpetsc-o test I get an error = DMGetMatrix not declared in this scope. and I realized that I can't find libpetsc.a or libpetsc.so anywhere. Where is the petsc library exactly? if I find the location of the petsc library and link it would it fix the problem? Thanks -- next part -- An HTML attachment was scrubbed... URL: http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120906/9cbea03f/attachment-0001.html