<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 24, 2015 at 7:39 PM, Diana Valencia <span dir="ltr"><<a href="mailto:valencia@astro.utoronto.ca" target="_blank">valencia@astro.utoronto.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Thanks for the response.  In compiling the subroutines, one that uses petsc is compiled successfully with:<div><br></div><div><div style="margin:0px;font-size:13px;font-family:Menlo">gfortran  -fdefault-real-8 -fdefault-double-8  -w -O2    -I /Users/valencia/software/petsc/petsc-3.2-p7/arch-darwin-c-opt/include -c PETScimple_mod.f90</div></div></div></blockquote><div><br></div><div>Yes, this is _compilation_, and it was successful. However, in order for the _link_ to be successful, you</div><div>will need the PETSc library on the link line. I am guessing that there is a make variable you must define.</div><div><br></div><div>I am Cc'ing one of the people at ETH since I think that place is responsible for this irresponsible build system.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>
<div>_______________________<br>Diana Valencia<br>Assistant Professor,  Physics & Astrophysics<br>Department of Physical and Environmental Sciences <br>University of Toronto, Scarborough<br>1265 Military Trail, Toronto, ON, Canada, M1C 1A4<br>Voice <a href="tel:416%20208-2986" value="+14162082986" target="_blank">416 208-2986</a></div>

</div>
<br><div><blockquote type="cite"><div>On Sep 24, 2015, at 8:34 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 24, 2015 at 7:21 PM, Diana Valencia<span> </span><span dir="ltr"><<a href="mailto:valencia@astro.utoronto.ca" target="_blank">valencia@astro.utoronto.ca</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div><br><div><div>I am trying to compile a third party software written in fortran90 that uses petsc.  There is the option of compiling the code with or without petsc.  Without it I have no problems, however when I use petsc, I encounter this:</div><div><br></div><div>After building the subroutines the error is:</div></div></div></div></blockquote><div><br></div><div>Nowhere in this link line do I see -lpetsc. Are you sure you have this build system configured correctly?</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><div><div style="margin:0px;font-size:13px;font-family:Menlo">gfortran  -fdefault-real-8 -fdefault-double-8  -w -O2    -o stagyy main.o advdif.o communication.o continents.o evocore.o geometry.o init.o io.o iter.o melting.o miscellaneous.o MPDATA.o multi.o refstate.o phase_change.o poisson.o prolongate_restrict.o relax_all.o relax_cell.o relax_point.o residues.o tracers.o v_advection.o vee_cycle.o viscosity.o  crw.o geoid.o implicit_diffusion.o linpack.o plot.o wrtpng.o  blas123.o lapack.o nxs_dummy.o  PETScimple_mod.o xdmf_hdf5_io_dummy.o bcs_mod.o composition_mod.o control_mod.o continents_mod.o vgrid_mod.o init_mod.o io_mod.o iter_mod.o melting_mod.o meltingfns_mod.o multi_mod.o phase_change_mod.o plot_mod.o precision_mod.o refstat_mod.o stencil_mod.o timestep_mod.o timing_mod.o tracers_mod.o viscosity_mod.o thermochem_mod.o platesLea_mod.o /opt/X11/lib/libpng.dylib   </div><div style="margin:0px;font-size:13px;font-family:Menlo">Undefined symbols for architecture x86_64:</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspcreate_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_create_everything in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspdestroy_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_destroy_everything in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspgetpc_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspsetfromoptions_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspsetoperators_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspsettype_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_kspsolve_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_matassemblybegin_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_matassemblyend_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_matcreateseqaij_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_create_everything in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_matdestroy_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_destroy_everything in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_matsetvalues_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_insert_compactrow in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_mpi_comm_size_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_initialize in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_pcfactorsetmatsolverpackage_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_pcsettype_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_petscfinalize_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_finalize in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_petscinitialize_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_initialize in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_veccreateseqwitharray_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_create_everything in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_vecdestroy_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_destroy_everything in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_vecplacearray_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo"> <span> </span>"_vecresetarray_", referenced from:</div><div style="margin:0px;font-size:13px;font-family:Menlo">     <span> </span>___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin:0px;font-size:13px;font-family:Menlo">ld: symbol(s) not found for architecture x86_64</div><div style="margin:0px;font-size:13px;font-family:Menlo">collect2: error: ld returned 1 exit status</div><div style="margin:0px;font-size:13px;font-family:Menlo">make: *** [stagyy] Error 1</div></div><div><br></div><div><br></div><div><br></div><div>My machine is OS X 10.10 and I am working with 64 bytes.  I configured petsc with the following flags:</div><div><br></div><div><div style="margin:0px;font-size:13px;font-family:Menlo">./configure --with-fc=gfortran --with-fortran-datatypes --with-x=0 --download-mpich --download-parmetis --download-superlu --download-superlu_dist --download-blacs --download-scalapack --download-mumps --download-umfpack --download-ml --with-debugging=no --download-f-blas-lapack=yes</div></div><div style="margin:0px;font-size:13px;font-family:Menlo"><br></div><div style="margin:0px;font-size:13px;font-family:Menlo">Any help is greatly appreciated!!</div><div style="margin:0px;font-size:13px;font-family:Menlo">Thanks</div><span><font color="#888888"><div style="margin:0px;font-size:13px;font-family:Menlo">Diana</div><div><br></div><div><br></div></font></span></div></div></div></blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>--<span> </span><br><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div></font></span></div></div></div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>