[petsc-users] Undefined symbols for architecture x86_64: "_dmviewfromoptions_",

Smith, Barry F. bsmith at mcs.anl.gov
Fri Sep 20 20:20:10 CDT 2019



   Currently none of the XXXViewFromOptions() have manual pages or Fortran stubs/interfaces. It is probably easier to remove them as inline functions and instead write them as full functions which just call PetscObjectViewFromOptions() with manual pages then the Fortran stubs/interfaces will be built automatically.

   Barry





> On Sep 20, 2019, at 6:16 PM, Mark Adams via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> DMViewFromOptions does not seem to have Fortran bindings and I don't see it on the web page for DM methods.
> 
> I was able to get it to compile using PetscObjectViewFromOptions
> 
> FYI,
> It seems to be an inlined thing, thus missing the web page and Fortran bindings:
> 
> include/petscdm.h:PETSC_STATIC_INLINE PetscErrorCode DMViewFromOptions(DM A,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,obj,name);}
> 
> 
> 
> 18:53 2 mark/feature-xgc-interface *+ ~/Codes/petsc/src/dm/impls/plex/examples/tutorials$ make ex6f90
> /Users/markadams/homebrew/Cellar/mpich/3.3.1/bin/mpif90 -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind  -Wall -ffree-line-length-0 -Wno-unused-dummy-argument -g   -I/Users/markadams/Codes/petsc/include -I/Users/markadams/Codes/petsc/arch-macosx-gnu-g/include -I/opt/X11/include -I/Users/markadams/homebrew/Cellar/mpich/3.3.1/include      ex6f90.F90  -Wl,-rpath,/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib -L/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib -Wl,-rpath,/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib -L/Users/markadams/Codes/petsc/arch-macosx-gnu-g/lib -Wl,-rpath,/opt/X11/lib -L/opt/X11/lib -Wl,-rpath,/Users/markadams/homebrew/Cellar/mpich/3.3.1/lib -L/Users/markadams/homebrew/Cellar/mpich/3.3.1/lib -Wl,-rpath,/Users/markadams/homebrew/Cellar/gcc/9.1.0/lib/gcc/9/gcc/x86_64-apple-darwin18/9.1.0 -L/Users/markadams/homebrew/Cellar/gcc/9.1.0/lib/gcc/9/gcc/x86_64-apple-darwin18/9.1.0 -Wl,-rpath,/Users/markadams/homebrew/Cellar/gcc/9.1.0/lib/gcc/9 -L/Users/markadams/homebrew/Cellar/gcc/9.1.0/lib/gcc/9 -lpetsc -lHYPRE -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lsuperlu -lsuperlu_dist -lfftw3_mpi -lfftw3 -lp4est -lsc -llapack -lblas -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lchaco -lparmetis -lmetis -ltriangle -lz -lX11 -lctetgen -lc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lc++ -ldl -o ex6f90
> Undefined symbols for architecture x86_64:
>   "_dmviewfromoptions_", referenced from:
>       _MAIN__ in ccALMXJ2.o
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status
> make: *** [ex6f90] Error 1



More information about the petsc-users mailing list