[mesa-users] Error linking to
Aaron Dotter
aaron.dotter at gmail.com
Fri Aug 23 01:44:10 EDT 2013
Hi Ehsan,
It's hard to tell for sure without seeing your code but I'll tell you my
guess.
You have told the compiler/linker what those functions look like but you
haven't actually told it where they live. Those functions
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
live in run_star_extras, so you would need to add
use run_star_extras
to the top of your new code AND make sure the compiler/linker knows how to
find that module.
Good luck!
Aaron
On Fri, Aug 23, 2013 at 1:35 AM, Ehsan Moravveji <e.moravveji at gmail.com>wrote:
>
> 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.
>
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20130823/39f2073e/attachment.html>
More information about the Mesa-users
mailing list