<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class=""><br class=""><div apple-content-edited="true" class="">
<div class="">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 class=""><br class=""></div><div class="">After building the subroutines the error is:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">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;" class="">Undefined symbols for architecture x86_64:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspcreate_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_create_everything in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspdestroy_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_destroy_everything in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspgetpc_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspsetfromoptions_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspsetoperators_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspsettype_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_kspsolve_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_matassemblybegin_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_matassemblyend_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_matcreateseqaij_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_create_everything in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_matdestroy_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_destroy_everything in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_matsetvalues_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_insert_compactrow in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_mpi_comm_size_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_initialize in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_pcfactorsetmatsolverpackage_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_pcsettype_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_petscfinalize_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_finalize in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_petscinitialize_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_initialize in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_veccreateseqwitharray_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_create_everything in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_vecdestroy_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_destroy_everything in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_vecplacearray_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> "_vecresetarray_", referenced from:</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class=""> ___petscimple_MOD_simplepetsc_solve in PETScimple_mod.o</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">ld: symbol(s) not found for architecture x86_64</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">collect2: error: ld returned 1 exit status</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">make: *** [stagyy] Error 1</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">My machine is OS X 10.10 and I am working with 64 bytes. I configured petsc with the following flags:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">./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;" class=""><br class=""></div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">Any help is greatly appreciated!!</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">Thanks</div><div style="margin: 0px; font-size: 13px; font-family: Menlo;" class="">Diana</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div></body></html>