[petsc-dev] openmp

Jed Brown jedbrown at mcs.anl.gov
Wed Nov 6 20:04:32 CST 2013


Svetlana Tkachenko <svetlana.tkachenko at fastmail.fm> writes:

> On Thu, 7 Nov 2013, at 10:22, Jed Brown wrote:
>> Svetlana Tkachenko <svetlana.tkachenko at fastmail.fm> writes:
>> > Right. I have spent half of an hour now trying to imagine what to do
>> > to link trying everything like a headless chicken and it did not
>> > work. 
>> 
>> You always have to send the error message.
>> 
>> > I would appreciate if you could come up with something that links, not
>> > just runs a single program.
>> 
>> The makefiles we suggested link a program of the same name as the source
>> file.  Do you have multiple source files?  You only have to edit the one
>> line and run "make".
>> 
>> program: several.o object.o files.o
>> 	${CLINKER} -o $@ $^ ${PETSC_LIB}
>> 
>> include ${PETSC_DIR}/conf/variables
>> include ${PETSC_DIR}/conf/rules
>> Email had 1 attachment:
>> + Attachment2
>>   1k (application/pgp-signature)
>
> ~/dev/test/petsc $ cat makefile
> myexample: myexample.o solver.o
>                 ${CLINKER} -o $@ $^ ${PETSC_LIB}
>
> include ${PETSC_DIR}/conf/variables
> include ${PETSC_DIR}/conf/rules
> ~/dev/test/petsc $ cat solver.f
>           subroutine solver()
> #include <finclude/petscsys.h>

Name your source file solver.F so that the Fortran compiler preprocesses
it.  (Or add the option -cpp, but that is more confusing and less
portable, so rename the source file.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20131106/4b50ae75/attachment.sig>


More information about the petsc-dev mailing list