Software Archive
Read-only legacy content
17061 Discussions

make: ifort: command not found on ubuntu12.04 - 64bit

soryana
Beginner
2,322 Views
I install l_fcompxe_intel64_2011.11.339 on ubuntu12.04 -64bit. When I compile MFIX software with ifort this error occured : make: ifort: command not found. It must be saied that before this error software message that : IFORT enviroment variables are not defined
Please add the following in your shell and rerun make_mfix
for .cshrc 'source path_to_fce_9.9/bin/ifortvars.csh'
for .kshrc or .bashrc 'source path_to_fce_9.0/bin/ifortvars.sh'
0 Kudos
7 Replies
Rob_Mueller-Albrecht
2,322 Views
Please have a look at the compiler installation directory - most likely /opt/intel/composer_xe/bin - and look for the compilervars.sh environment configuration script.

I would recommend to add something like

source /opt/intel/ ... /compilervars.sh

to your user account .bashrc to always have the environment set up correctly for the compiler

Thanks, Rob
0 Kudos
soryana
Beginner
2,322 Views
I add these two line to .bashrc :
# source /opt/intel/composer_xe_2011_sp1.11.339/bin/compilervars.sh
# source /opt/intel/composer_xe_2011_sp1.11.339/bin/compilervars.csh
but, yet that error occur !

root@abbaszade-virtual-machine:~/MFIX/tutorials/FluidBed_DES# sh ../../model/make_mfix


*******************************************
* Creating the MFIX-executable mfix.exe *
* Version 2010-1 *
*******************************************


MFIX directory is /home/abbaszade2/MFIX/model


Do you need SMP version? (y/n) [no]

Do you need DMP version? (y/n) [no]
Do you need debug version? (y/n) [no]

Force re-compilation of source files in run directory? (y/n) [no]




64 bit Linux system detected, please select compiler.

==============================================================
MFIX Compilation directives available for following compilers:
==============================================================
[1] Intel Fortran Compiler (IFORT - FCE for 64 bit)
[2] Intel Fortran Compiler (IFORT - FCE for 64 bit) on AMD Opteron
[3] Portland Group Linux Fortran Compiler (pgf90)
[4] PathScale compiler (pathf90)
[5] Portland Group Linux Fortran Compiler (pgf90) on AMD Opteron
[6] Portland Group Linux Fortran Compiler (pgf90) on Cray XT3 at PSC
[7] Portland Group Linux Fortran Compiler (pgf90) on Cray XT4 at NCCS
[8] PathScale Compiler (pathf90) on Cray XT4 at NCCS
[9] Pathscale Compiler (pathf90) on Cray XT4 at NERSC
[10] IBM Fortran Compiler (xlf90) on Blue Gene at ANL ALCF
[11] gfortran

Select the compiler to compile MFIX? [1] 1

Intel Compiler selected
______ If you get 'ifort: Command not found' _______
IFORT environment variables are not defined

Please add the following in your shell and rerun make_mfix
for .cshrc 'source path_to_fce_9.0/bin/ifortvars.csh'
for .kshrc or .bashrc 'source path_to_fce_9.0/bin/ifortvars.sh'



Compiling with machine-dependent file LINUX_intel.F




Ignore messages such as "Cannot access *.f or *.inc"
ls: cannot access *.f: No such file or directory
ls: cannot access *.inc: No such file or directory


Files from run directory used for making Mfix:
ls: cannot access *.0*: No such file or directory


******************************************************
Preparing files for your serial/smp compilation
******************************************************



Compiling inline files . . .
*******

make -f mfix_l_not.make compare.o eosg.o discretize.o
ifort -c -I. -w -w95 -i_dynamic -convert big_endian -assume byterecl -FR -O3 -axW -ip -fp-model precise -ftz param_mod.f
make: ifort: Command not found
make: *** [param.mod] Error 127

Please wait . . .
make -f mfix_l_not.make mfix.exe
ifort -c -I. -w -w95 -i_dynamic -convert big_endian -assume byterecl -FR -O3 -axW -ip -fp-model precise -ftz param_mod.f
make: ifort: Command not found
make: *** [param.mod] Error 127


*** File mfix.exe NOT created.


I remind that my ubuntu is version12.04 and my IFORT version is 2011.11.339. when I install ifort, it messaged ifort not supported the this version of OS .
what can I do?
0 Kudos
Georg_Z_Intel
Employee
2,322 Views
Hello,

IIRC the standard shell on Ubuntu is dash (sh is linked to it). I'd recommend to invoke the build via:

root@abbaszade-virtual-machine:~/MFIX/tutorials/FluidBed_DES# /bin/bash ../../model/make_mfix

Btw.: I see you kicked-off the build as user root (which is not good practice). Did you update the .bashrc initialization file for the same user?

Best regards,

Georg Zitzlsberger
0 Kudos
soryana
Beginner
2,322 Views
Hello,
Thanks for your reply.
First I perform the same thing that you saied, but the below error occured. Because when I install the ifort this message occured that "this verion of ifort support ubuntu 10.04 and 11.04". Therefore, I uninstall the ubuntu 12.04 and install ubuntu 11.04, then run on several manner but same errors occured.
I re-built the "make_mfix" as saeid you and rerun in two mode, user root and non-user root. but same errors occured :
root@abbaszade-virtual-machine:~/MFIX/tutorials/FluidBed_DES# /bin/bash ../../model/make_mfix
*******************************************
* Creating the MFIX-executable mfix.exe *
* Version 2010-1 *
*******************************************
MFIX directory is /home/abbaszade/MFIX/model
Do you need SMP version? (y/n) [no]
Do you need DMP version? (y/n) [no]
Do you need debug version? (y/n) [no]
Force re-compilation of source files in run directory? (y/n) [no]
64 bit Linux system detected, please select compiler.
==============================================================
MFIX Compilation directives available for following compilers:
==============================================================
[1] Intel Fortran Compiler (IFORT - FCE for 64 bit)
[2] Intel Fortran Compiler (IFORT - FCE for 64 bit) on AMD Opteron
[3] Portland Group Linux Fortran Compiler (pgf90)
[4] PathScale compiler (pathf90)
[5] Portland Group Linux Fortran Compiler (pgf90) on AMD Opteron
[6] Portland Group Linux Fortran Compiler (pgf90) on Cray XT3 at PSC
[7] Portland Group Linux Fortran Compiler (pgf90) on Cray XT4 at NCCS
[8] PathScale Compiler (pathf90) on Cray XT4 at NCCS
[9] Pathscale Compiler (pathf90) on Cray XT4 at NERSC
[10] IBM Fortran Compiler (xlf90) on Blue Gene at ANL ALCF
[11] gfortran
Select the compiler to compile MFIX? [1] 1
Intel Compiler selected
______ If you get 'ifort: Command not found' _______
IFORT environment variables are not defined
Please add the following in your shell and rerun make_mfix
for .cshrc 'source path_to_fce_9.0/bin/ifortvars.csh'
for .kshrc or .bashrc 'source path_to_fce_9.0/bin/ifortvars.sh'
Compiling with machine-dependent file LINUX_intel.F
Ignore messages such as "Cannot access *.f or *.inc"
ls: cannot access *.f: No such file or directory
ls: cannot access *.inc: No such file or directory
Files from run directory used for making Mfix:
ls: cannot access *.0*: No such file or directory
******************************************************
Preparing files for your serial/smp compilation
******************************************************
\n Compiling inline files . . .
*******
make -f mfix_l_not.make compare.o eosg.o discretize.o
make: `compare.o' is up to date.
make: `eosg.o' is up to date.
make: `discretize.o' is up to date.
\nPlease wait . . .
make -f mfix_l_not.make mfix.exe
ifort -I. \
accum_resid.o \
adjust_a_u_g.o \
adjust_a_u_s.o \
adjust_a_v_g.o \
adjust_a_v_s.o \
adjust_a_w_g.o \
adjust_a_w_s.o \
adjust_dt.o \
adjust_eps.o \
adjust_leq.o \
adjust_rop.o \
adjust_theta.o \
allocate_arrays.o \
ambm_mod.o \
bc_mod.o \
bc_phi.o \
bc_theta.o \
b_m_p_star.o \
boundfunijk3_mod.o \
boundfunijk_mod.o \
bound_x.o \
calc_cell.o \
calc_coeff.o \
calc_d.o \
calc_dif_g.o \
calc_dif_s.o \
calc_drag.o \
calc_e.o \
calc_gama.o \
calc_grbdry.o \
calc_h.o \
calc_k_cp.o \
calc_k_g.o \
calc_k_s.o \
calc_mflux.o \
calc_mu_g.o \
calc_mu_s.o \
calc_mw.o \
calc_outflow.o \
calc_p_star.o \
calc_resid.o \
calc_s_ddot_s.o \
calc_trd_g.o \
calc_trd_s.o \
calc_u_friction.o \
calc_vol_fr.o \
calc_xsi.o \
cal_d.o \
cdist_mod.o \
check_ab_m.o \
check_convergence.o \
check_data_01.o \
check_data_02.o \
check_data_03.o \
check_data_04.o \
check_data_05.o \
check_data_06.o \
check_data_07.o \
check_data_08.o \
check_data_09.o \
check_data_20.o \
check_data_30.o \
check_mass_balance.o \
check_mod.o \
check_one_axis.o \
check_plane.o \
chischeme_mod.o \
cn_extrapol.o \
coeff_mod.o \
compare.o \
constant_mod.o \
cont_mod.o \
conv_dif_phi.o \
conv_dif_u_g.o \
conv_dif_u_s.o \
conv_dif_v_g.o \
conv_dif_v_s.o \
conv_dif_w_g.o \
conv_dif_w_s.o \
conv_pp_g.o \
conv_rop.o \
conv_rop_g.o \
conv_rop_s.o \
conv_source_epp.o \
copy_a.o \
corner.o \
corner_mod.o \
correct_0.o \
correct_1.o \
dgtsl.o \
dif_u_is.o \
dif_v_is.o \
dif_w_is.o \
discretize.o \
display_resid.o \
drag_gs.o \
drag_mod.o \
drag_ss.o \
energy_mod.o \
eosg.o \
equal.o \
error_routine.o \
exchange.o \
exit.o \
fldvar_mod.o \
flow_to_vel.o \
function_mod.o \
funits_mod.o \
g_0.o \
geometry_mod.o \
get_bc_area.o \
get_data.o \
get_eq.o \
get_flow_bc.o \
get_hloss.o \
get_is.o \
get_philoss.o \
get_smass.o \
get_stats.o \
get_walls_bc.o \
ic_mod.o \
in_bin_512.o \
in_bin_512i.o \
indices_mod.o \
init_ab_m.o \
init_fvars.o \
init_namelist.o \
init_resid.o \
is_mod.o \
iterate.o \
k_epsilon_prop.o \
kintheory_drag_ss.o \
kintheory_energy_dissipation_ss.o \
kintheory_mod.o \
kintheory_u_s.o \
kintheory_v_s.o \
kintheory_w_s.o \
leq_bicgs.o \
leq_bicgst.o \
leq_cg.o \
leq_gmres.o \
leqsol_mod.o \
leq_sor.o \
line_too_big.o \
location_check.o \
location.o \
machine.o \
machine_mod.o \
make_upper_case.o \
mark_phase_4_cor.o \
matrix_mod.o \
mfix.o \
mflux_mod.o \
mod_bc_i.o \
mod_bc_j.o \
mod_bc_k.o \
open_file.o \
open_files.o \
out_array_c.o \
out_array.o \
out_array_kc.o \
out_array_k.o \
out_bin_512.o \
out_bin_512i.o \
out_bin_512r.o \
out_bin_r.o \
output_mod.o \
parallel_mod.o \
param1_mod.o \
param_mod.o \
parse_line.o \
parse_mod.o \
parse_resid_string.o \
parse_rxn.o \
partial_elim.o \
pgcor_mod.o \
physical_prop.o \
physprop_mod.o \
pscor_mod.o \
read_database.o \
read_namelist.o \
read_res0.o \
read_res1.o \
remove_comment.o \
reset_new.o \
residual_mod.o \
rrates0.o \
rrates.o \
rrates_init.o \
run_mod.o \
rxns_mod.o \
scalar_prop.o \
scalars_mod.o \
scales_mod.o \
seek_comment.o \
seek_end.o \
set_bc0.o \
set_bc1.o \
set_constants.o \
set_constprop.o \
set_flags.o \
set_fluidbed_p.o \
set_geometry1.o \
set_geometry.o \
set_ic.o \
set_increments3.o \
set_increments.o \
set_index1a3.o \
set_index1a.o \
set_index1.o \
set_l_scale.o \
set_max2.o \
set_mw_mix_g.o \
set_outflow.o \
set_ro_g.o \
set_wall_bc.o \
shift_dxyz.o \
solve_continuity.o \
solve_energy_eq.o \
solve_epp.o \
solve_granular_energy.o \
solve_k_epsilon_eq.o \
solve_lin_eq.o \
solve_pp_g.o \
solve_scalar_eq.o \
solve_species_eq.o \
solve_vel_star.o \
source_granular_energy.o \
source_phi.o \
source_pp_g.o \
source_rop_g.o \
source_rop_s.o \
source_u_g.o \
source_u_s.o \
source_v_g.o \
source_v_s.o \
source_w_g.o \
source_w_s.o \
tau_g_mod.o \
tau_s_mod.o \
tau_u_g.o \
tau_u_s.o \
tau_v_g.o \
tau_v_s.o \
tau_w_g.o \
tau_w_s.o \
test_lin_eq.o \
time_cpu_mod.o \
time_march.o \
tmp_array1_mod.o \
tmp_array_mod.o \
toleranc_mod.o \
trace_mod.o \
transfer.o \
transport_prop.o \
turb_mod.o \
undef_2_0.o \
under_relax.o \
update_old.o \
ur_facs_mod.o \
usr0.o \
usr1.o \
usr2.o \
usr3.o \
usr_init_namelist.o \
usr_mod.o \
usr_write_out0.o \
usr_write_out1.o \
utilities.o \
vavg_u_g.o \
vavg_u_s.o \
vavg_v_g.o \
vavg_v_s.o \
vavg_w_g.o \
vavg_w_s.o \
vf_gs_x.o \
vf_gs_y.o \
vf_gs_z.o \
visc_g_mod.o \
visc_s_mod.o \
vshear_mod.o \
vtc_scalar.o \
write_ab_m.o \
write_ab_m_var.o \
write_error.o \
write_header.o \
write_out0.o \
write_out1.o \
write_out3.o \
write_res0.o \
write_res1.o \
write_spx0.o \
write_spx1.o \
write_table.o \
write_usr0.o \
write_usr1.o \
xerbla.o \
xsi_array_mod.o \
zero_array.o \
zero_norm_vel.o \
allocate_cut_cell_arrays.o \
allocate_dummy_cut_cell_arrays.o \
calc_vort_out.o \
cartesian_grid_init_namelist.o \
CG_set_bc0.o \
CG_set_outflow.o \
CG_source_u_g.o \
CG_source_u_s.o \
CG_source_v_g.o \
CG_source_v_s.o \
CG_source_w_g.o \
CG_source_w_s.o \
check_data_cartesian.o \
cutcell_mod.o \
cut_cell_preprocessing.o \
dashboard_mod.o \
deallocate_cut_cell_arrays.o \
define_quadrics.o \
dmp_cartesian.o \
eval_usr_fct.o \
get_alpha.o \
get_connectivity.o \
get_cut_cell_flags.o \
get_cut_cell_volume_area.o \
get_delh.o \
get_master.o \
get_poly_data.o \
polygon_mod.o \
progress_bar_mod.o \
quadric_mod.o \
set_Odxyz.o \
update_dashboard.o \
vtk_mod.o \
vtk_out.o \
write_progress_bar.o \
calc_jacobian.o \
check_data_chem.o \
dgpadm.o \
exponential.o \
fex.o \
g_derivs.o \
jac.o \
mchem_init.o \
mchem_mod.o \
mchem_odepack_init.o \
mchem_time_march.o \
misat_table_init.o \
react.o \
usrfg.o \
add_part_to_link_list.o \
calc_app_coh_force.o \
calc_cap_coh_force.o \
calc_cohesive_forces.o \
calc_esc_coh_force.o \
calc_square_well.o \
calc_van_der_waals.o \
check_link.o \
check_sw_wall_interaction.o \
check_vdw_wall_interaction.o \
initialize_cohesion_parameters.o \
initialize_coh_int_search.o \
linked_interaction_eval.o \
remove_part_from_link_list.o \
unlinked_interaction_eval.o \
update_search_grids.o \
calc_force_des.o \
cell_near_wall.o \
cfassign.o \
cffctowall.o \
cffctow.o \
cfnewvalues.o \
cfnocontact.o \
cfrelvel.o \
cfslide.o \
cfslidewall.o \
cfupdateold.o \
cfwallcontact.o \
cfwallposvel.o \
check_des_bc.o \
check_des_data.o \
des_allocate_arrays.o \
des_bc_mod.o \
des_check_particle.o \
des_functions.o \
des_granular_temperature.o \
des_init_arrays.o \
des_init_bc.o \
des_init_namelist.o \
des_mass_inlet.o \
des_time_march.o \
discretelement_mod.o \
drag_fgs.o \
gas_drag.o \
generate_particle_config.o \
grid_based_neighbor_search.o \
interpolation_mod.o \
make_arrays_des.o \
neighbour.o \
nsquare.o \
octree.o \
particles_in_cell.o \
quadtree.o \
randomno_mod.o \
read_des_restart.o \
walledgecontact.o \
wallfacecontact.o \
wallnodecontact.o \
write_des_data.o \
write_des_restart.o \
compar_mod.o \
dbg_util_mod.o \
debug_mod.o \
gridmap_mod.o \
mpi_mod.o \
mpi_utility_mod.o \
parallel_mpi_mod.o \
sendrecv3_mod.o \
sendrecv_mod.o \
gaussj.o \
odeint.o \
rkck.o \
rkqs.o \
source_population_eq.o \
usr_dqmom.o \
adjust_eps_ghd.o \
bulk_viscosity.o \
calc_d_ghd.o \
calc_external_forces.o \
calc_nflux.o \
chi_ij_GHD.o \
cooling_rate.o \
cooling_rate_tc.o \
dufour_coeff.o \
ghd.o \
ghdmassflux.o \
ghdtheory_mod.o \
mass_mobility.o \
ordinary_diff.o \
partial_elim_ghd.o \
pressure.o \
shear_viscosity.o \
source_ghd_granular_energy.o \
thermal_conductivity.o \
thermal_diffusivity.o \
thermal_mobility.o \
transport_coeff_ghd.o \
get_values.o \
readTherm.o \
-o mfix.exe odepack.a -L /opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/em64t -lmkl_lapack -lmkl_em64t -lmkl_core -lvml -lguide -lpthread
ld: cannot find -lmkl_lapack
ld: cannot find -lmkl_em64t
ld: cannot find -lvml
ld: cannot find -lguide
make: *** [mfix.exe] Error 1
*** File mfix.exe NOT created.
0 Kudos
Georg_Z_Intel
Employee
2,322 Views
Hello,

this looks like a project being tailored for pre-12.x compilers.

First, with 12.x we changed "ifortvars.sh" (and "iccvars.sh") to "compilervars.sh" PLUS argument, which is either "intel64" (64 bit) or "ia32" (32 bit), e.g.:
$ source /opt/intel/composer_xe_2011_sp1.11.339/bin/compilervars.h intel64
You did not use any argument above. To me it looks like "ifort" was found, though. Maybe you did provide an argument in your case.

Second, we also changed the directory structure beginning with Intel MKL 10.3. Before, we had 64 bit libraries in "em64t" sub-directory. Now it's "intel64". Also see:
http://registrationcenter.intel.com/irc_nas/1977/mklnotes_10.3.0.htm

You only need to make sure that Intel MKL libraries are found in the correct directory:
...
-o mfix.exe odepack.a -L /opt/intel/composer_xe_2011_sp1.11.339/mkl/lib/intel64
-lmkl_lapack -lmkl_em64t -lmkl_core -lvml -lguide -lpthread

Best regards,

Georg Zitzlsberger
0 Kudos
Leonardo_M_2
Beginner
2,322 Views

Hello there, also a newbie here.

So far, all pages I found about this subject recommend editing your .basrc file. I have tried many things, like adding all of these at the end of my .bashrc file, all failures:

Code:

source /opt/intel/composer_xe_2015.3.187/bin/intel64/ifortvars.sh intel64
Code:
source ~/opt/intel/composer_xe_2015.3.187/bin/ifortvars.sh intel64
Code:
source /root/opt/intel/composer_xe_2015.3.187/bin/intel64/ifortvars.sh intel64

The last one actually messed up my terminal, don't recommend it (when you start the terminal, you're not a superuser yet, so you don't have permission to access root, and it goes wrong, apparently).
The change that made a difference was actually this one:

Code:

PATH="/opt/intel/composer_xe_2015.3.187/bin/intel64:$PATH"
export PATH
LD_LIBRARY_PATH="/opt/intel/composer_xe_2015.3.187/compiler/lib/intel64:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH

 

After that, this is the kind of response I get from the terminal:
leonardo@Leonardo-linux:~$ which ifort
/opt/intel/composer_xe_2015.3.187/bin/intel64/ifort
leonardo@Leonardo-linux:~$ ifort -v
ifort version 15.0.3
leonardo@Leonardo-linux:~$ ifort
ifort: command line error: no files specified; for help type "ifort -help"


So it seems that things are OK, but they're not.
When I try this other command, this is what comes out of the terminal:

leonardo@Leonardo-linux:~/lib$ sudo make -f makefile
ifort -c -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I/lib/src/grib_api-1.13.1/include erf.f90
/bin/bash: ifort: command not found
make: *** [erf.o] Error 127


Can someone help me? Here's a snippet of the makefile:

HELL = /bin/bash 
MAIN = FLEXPART_IFORT 
# 

FC       = ifort 
INCPATH  = /lib/src/grib_api-1.13.1/include 
LIBPATH1 = /lib/src/grib_api-1.13.1/lib 
LIBPATH2 = /lib/jasper-1.900.1/lib 
LIBPATH3 = ~/root/opt/intel/composer_xe_2015.3.187/bin/intel64 
#FFLAGS   =   -O3 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) 
FFLAGS   =   -O2 -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) 
#FFLAGS   =   -fbounds-check -m64 -mcmodel=medium -fconvert=little-endian -frecord-marker=4 -I$(INCPATH) 
LDFLAGS  = $(FFLAGS) -L$(LIBPATH3) -L$(LIBPATH2) -L$(LIBPATH1) -lgrib_api_f90 -lgrib_api -lm -ljasper 
# 

MODOBJS = \ 
par_mod.o               com_mod.o \ 

OBJECTS = \ 
writeheader.o           assignland.o\ 

$(MAIN): $(MODOBJS) $(OBJECTS) 
	$(FC) *.o -o $(MAIN) $(LDFLAGS) 

$(OBJECTS): $(MODOBJS) 

%.o: %.f90 
	$(FC) -c $(FFLAGS) $< 

clean: 
	rm *.o *.mod 

 

0 Kudos
TimP
Honored Contributor III
2,322 Views

As you probably figured out, if you read the more comprehensible parts of the thread, your sudo command discards your path settings as well as taking away your ownership of any files it  creates.

If you had a makefile including an install target requiring sudo (but not fort), normal usage would be

make .....

After that completes

sudo make install 

0 Kudos
Reply