[mesa-users] compile problem

Robert Farmer rjfarmer at asu.edu
Fri Jun 10 10:12:33 EDT 2016


The problem is the makefile_header isn't meant to be edited. If you need to
change compilers you should edit makefile_header_nonsdk to set the compiler
and copy that to makefile_header.

That said the reason it didn't work originally is the something is being
added to $path after you've sourced the SDK script so that the SDK compiler
isn't first in $path. I'd see if putting the source sdk line in your cshrc
file at the end of the file.

Rob
On Jun 10, 2016 13:50, "Frederic V. Hessman" <
hessman at astro.physik.uni-goettingen.de> wrote:

> Thanks, Aaron - that worked just fine!  I simply changed the one line to
>
> star_def.o : COMPILE_CMD = $(COMPILE) -Dgfortran
>
> (according to grep, star_def.o really is the only makefile line affected)
> and mesa compiled completely thereafter. Tutorial model worked as well, so
> I’m off to ….
>
> Other than the one change, this is an easy way for people to get around
> multiple compiler version problems.
>
> Rick
>
> On 10 Jun 2016, at 14:12, Aaron Dotter <aaron.dotter at gmail.com> wrote:
>
> Hi Rick,
>
> It seems from the error message that the problem is with the macro
> definition (-D).  In the makefile, star_def is compiled with
>
> star_def.o : COMPILE_CMD = $(COMPILE) -D$(FC)
>
> since you've redefined FC in a non-standard way, it fails.  You can either
>
> 1. figure out how to source the SDK scripts so that you don't have to edit
> the makefile_header as you have done (with full path to gfortran and gcc)
>
> or
>
> 2. change the star makefile so that the line quoted above becomes
>
> star_def.o : COMPILE_CMD = $(COMPILE) -Dgfortran
>
>
> Option 1 is preferable but option 2 will work.
>
>
> Aaron
>
>
>
> P.S.  To the cognoscenti: Why is the -D used on star_def?
>
>
>
> On Fri, Jun 10, 2016 at 3:00 AM, Frederic V. Hessman <
> hessman at astro.physik.uni-goettingen.de> wrote:
>
>> Wanted to install a brand-new Mesa (r8118) on my OSX laptop:  downloaded
>> the latest mesasdk and mesa distribution and following the instructions
>>
>> % uname -a
>> Darwin morisot 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36
>> PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
>> % mesasdk_version.sh
>> x86_64-osx-10.10-20160404
>> % gfortran -v
>> Using built-in specs.
>> Target:
>> Configured with: ../configure
>> --prefix=/opt/local/lib/g95/x86_64-apple-darwin15/4.2.4
>> --enable-languages=c --disable-multilib --with-included-gettext
>> --with-libiconv=/opt/local
>> --libdir=/opt/local/lib/g95/x86_64-apple-darwin15/4.2.4
>> --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld
>> --with-nm=/opt/local/bin/nm --build=x86_64-apple-darwin15
>> --host=x86_64-apple-darwin15
>> Thread model: posix
>> gcc version 4.2.4 (g95 0.93!) Jan 31 2016
>> % echo $MESASDK_ROOT
>> /Applications/mesasdk
>> % echo $PATH
>>
>> /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Applications/mesasdk/bin:/opt/local/bin:/opt/local/sbin:.:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Applications/mesasdk/bin:/opt/local/bin:/opt/local/sbin:.:/Applications/mesasdk/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:.:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin:/usr/texbin:/Users/hessman/bin:/opt/local/bin:/usr/local/cuda/bin:/usr/local/astrometry/bin:/opt/astrometry/bin:/Users/hessman/bin:/opt/local/bin:/usr/local/cuda/bin:/usr/local/astrometry/bin:/opt/astrometry/bin:/Users/hessman/bin:/opt/local/bin:/usr/local/cuda/bin:/usr/local/astrometry/bin:/opt/astrometry/bin
>> % cat ~/.cshrc | grep MESA
>> # --- MESA ---
>> setenv MESASDK_ROOT /Applications/mesasdk
>> source $MESASDK_ROOT/bin/mesasdk_init.csh
>> setenv MESA_DIR /Users/hessman/Projects/mesa
>>
>>
>> Since I already had gfortran installed via MacPorts, had to force
>> compilation using the mesasdk compilers and chose to simply modify the
>> global makefile header:
>>
>>
>> % grep }/bin $MESA_DIR/utils/makefile_header
>> FC = ${MESASDK_ROOT}/bin/gfortran
>> CC = ${MESASDK_ROOT}/bin/gcc
>>
>>
>> (if this isn’t the problem, it would be nice to use this as the default
>> and thus automatically avoid collisions!).  Installation then went fine
>> until it encountered ../public/star_def.f90 :
>>
>>
>> building star package.
>> makedepf90 -m %m.mod
>> -I.:../public:../private:../defaults:../job:../other:../se star_def.f90
>> star_profile_def.f90 star_history_def.f90 star_private_def.f90
>> other_extras.f90 other_split_mix.f90 other_d_mix.f90 other_am_mixing.f90
>> other_wind.f90 other_adjust_net.f90 other_adjust_mdot.f90 other_brunt.f90
>> other_brunt_smoothing.f90 other_build_initial_model.f90 other_torque.f90
>> other_torque_implicit.f90 other_energy.f90 other_energy_implicit.f90
>> other_cgrav.f90 other_opacity_factor.f90 other_mlt.f90
>> other_adjust_mlt_gradt_fraction.f90 other_after_set_mixing_info.f90
>> other_neu.f90 other_paquette_coefficients.f90 other_atm.f90
>> other_diffusion.f90 other_eos.f90 other_kap.f90 other_eps_grav.f90
>> other_momentum.f90 other_pgstar_plots.f90 other_mesh_functions.f90
>> other_surface_pt.f90 other_write_pulsation_info.f90
>> other_get_pulsation_info.f90 other_edit_pulsation_info.f90
>> other_edit_gyre_info.f90 other_get_gyre_model.f90
>> other_history_data_initialize.f90 other_history_data_add_model.f90
>> other_newton_monitor.f90 other_photo_write.f90 other_photo_read.f90
>> other_astero_freq_corr.f90 star_utils.f90 ctrls_io.f90 alloc.f90
>> overshoot.f90 turbulent_diffusion.f90 mix_smoothing.f90 mlt_info.f90
>> rotation_mix_info.f90 mix_info.f90 opacities.f90 net.f90 neu.f90
>> solve_mix.f90 solve_burn.f90 micro.f90 hydro_rotation.f90 brunt.f90
>> create_atm.f90 hydro_reconstruct.f90 hydro_riemann.f90 hydro_vars.f90
>> report.f90 read_model.f90 write_model.f90 photo_in.f90 photo_out.f90
>> pulsation_info.f90 profile_getval.f90 profile.f90 mesh_functions.f90
>> mesh_plan.f90 mesh_adjust.f90 eps_grav.f90 hydro_chem_eqns.f90
>> hydro_alpha_rti_eqns.f90 hydro_eqns.f90 hydro_mtx.f90
>> hydro_newton_procs.f90 solve_omega_mix.f90 solve_alpha_RTI.f90
>> history_specs.f90 history.f90 pgstar_ctrls_io.f90 pgstar_support.f90
>> pgstar_hist_track.f90 pgstar_kipp.f90 pgstar_dpg_dnu.f90 pgstar_trho.f90
>> pgstar_hr.f90 pgstar_rti.f90 pgstar_r_l.f90 pgstar_r_teff.f90
>> pgstar_l_teff.f90 pgstar_l_r.f90 pgstar_l_v.f90 pgstar_logl_teff.f90
>> pgstar_logl_r.f90 pgstar_logl_v.f90 pgstar_logg_teff.f90
>> pgstar_logg_logt.f90 pgstar_history_panels.f90 pgstar_trho_profile.f90
>> pgstar_mode_prop.f90 pgstar_power.f90 pgstar_abundance.f90
>> pgstar_dynamo.f90 pgstar_mixing_ds.f90 pgstar_summary_burn.f90
>> pgstar_summary_profile.f90 pgstar_summary_history.f90 pgstar_summary.f90
>> pgstar_color_magnitude.f90 pgstar_profile_panels.f90 pgstar_grid.f90
>> pgstar_network.f90 pgstar.f90 timestep.f90 do_one_utils.f90 adjust_xyz.f90
>> adjust_net.f90 adjust_mass.f90 adjust_mesh_split_merge.f90
>> adjust_mesh_support.f90 adjust_mesh_plot.f90 adjust_mesh.f90
>> paquette_coeffs.f diffusion_support.f90 diffusion_procs.f90 diffusion.f90
>> element_diffusion.f90 evolve_support.f90 star_sparse.f90 star_bcyclic.f90
>> star_bcyclic_qp.f90 star_newton.f90 solve_hydro.f90
>> lagrangian_riemann_solver.f90 struct_burn_mix.f90 kuma.f90 winds.f90
>> evolve.f90 relax.f90 create_initial_model.f90 pre_ms_model.f90
>> init_model.f90 remove_shells.f90 init.f90 star_job_ctrls_io.f90
>> star_lib.f90 se_support.f90 run_star_support.f90 sample_pgstar_plot.f90 >
>> .depend
>> /Applications/mesasdk/bin/gfortran -fno-range-check -fmax-errors=7
>> -fprotect-parens -fno-sign-zero -fbacktrace -ggdb -finit-real=snan
>> -fopenmp  -I../public -I../private -I../../include -Wunused-value -Werror
>> -W -Wno-compare-reals -Wno-unused-parameter -fimplicit-none   -O2 -c
>> -ffree-form -x f95-cpp-input -I/Applications/mesasdk/include -I../defaults
>> -I../job -I../other -D/Applications/mesasdk/bin/gfortran
>> ../public/star_def.f90
>> <command-line>:2:0: Error: macro names must be identifiers
>>
>>
>> Haven’t used a fortran compiler in what seems to be decades, so would
>> appreciate a hint at what to do.  Sorry to bother you all - it’s probably a
>> trivial error….
>>
>> Thanks!
>> Rick
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> What NetFlow Analyzer can do for you? Monitors network bandwidth and
>> traffic
>> patterns at an interface-level. Reveals which users, apps, and protocols
>> are
>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>> J-Flow, sFlow and other flows. Make informed decisions using capacity
>> planning reports.
>> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>> _______________________________________________
>> mesa-users mailing list
>> mesa-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mesa-users
>>
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> 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/20160610/e3812a14/attachment.html>


More information about the Mesa-users mailing list