[mesa-users] Error linking to

Ehsan Moravveji e.moravveji at gmail.com
Thu Aug 22 11:35:23 EDT 2013


Hi all,
Sorry if the following email looks ugly!
I am writing an HDF5 support for mesa (in collaboration with Jean-Claude Passy), in parallel to the SE support. The motivation is that this format saves disk space with a factor of 3 to 4 compared to the ascii output dumped into the LOGS directory.

When I compile my external module, it gives me the following error, and cannot link to "extra_history_cols.inc"
As you can see below, my external module called user_output_hdf5.f compiles fine.

ehsan:se ehsan$ ./clean 
ehsan:se ehsan$ ./mk 
gfortran -fno-range-check -fmax-errors=100  -fopenmp -fbounds-check -Wuninitialized -Warray-bounds -g -ffree-form -x f95-cpp-input -I/Users/ehsan/programs/mesa-5329/include -I/Applications/mesasdk/include -c /Users/ehsan/programs/user_extras/output_hdf5/user_output_hdf5.f
gfortran -fno-range-check -fmax-errors=100  -fopenmp -fbounds-check -Wuninitialized -Warray-bounds -g -ffree-form -x f95-cpp-input -I/Users/ehsan/programs/mesa-5329/include -I/Applications/mesasdk/include -c ../src/run_star_extras.f
gfortran -fno-range-check -fmax-errors=100  -fopenmp -fbounds-check -Wuninitialized -Warray-bounds -g -ffree-form -x f95-cpp-input -I/Users/ehsan/programs/mesa-5329/include -I/Applications/mesasdk/include -c /Users/ehsan/programs/mesa-5329/star/job/run_star.f
gfortran -fno-range-check -fmax-errors=100  -fopenmp -fbounds-check -Wuninitialized -Warray-bounds -g -ffree-form -x f95-cpp-input -I/Users/ehsan/programs/mesa-5329/include -I/Applications/mesasdk/include -c ../src/run.f
gfortran -fopenmp -o ../star user_output_hdf5.o run_star_extras.o run_star.o  run.o -L/Users/ehsan/programs/mesa-5329/lib -lstar -lionization -latm -lcolors -lmlt -lnse -lnet -leos -lkap -lscreen -lrates -lreaclib -lweak -lecapture -lneu -lchem -linterp_2d -linterp_1d -lnum -lutils -lmtx -lconst -lmesaklu `mesasdk_lapack_link` `mesasdk_blas_link` `mesasdk_pgplot_link` `mesasdk_se_link` 
Undefined symbols for architecture x86_64:
  "_data_for_extra_history_columns_", referenced from:
      ___user_output_hdf5_MOD_write_hist_col in user_output_hdf5.o
  "_how_many_extra_history_columns_", referenced from:
      ___user_output_hdf5_MOD_write_hist_col in user_output_hdf5.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [star] Error 1

FAILED


The reason is that I need to call get_data_for_history_columns from star_lib.f
Here is how my call looks like:

    call get_data_for_history_columns(s, id_extra, &
            how_many_extra_history_columns, data_for_extra_history_columns, &
            num_log_columns, nz, log_names, log_vals, log_is_int, ierr)

To have access to how_many_extra_history_columns and data_for_extra_history_columns, I make an interface with extra_history_cols.inc in my subroutine giving the full path to the file as:

    interface
       include '/Users/ehsan/programs/mesa-5329/star/job/extra_history_cols.inc'
    end interface

However, something is going wrong that I cannot figure out for now.
Can any of the experts point out what I am missing?

Kind regards.
Ehsan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20130822/1b2bfe5f/attachment.html>


More information about the Mesa-users mailing list