Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Problem in compiling in parallel

m2sam2003
Beginner
923 Views
dear all,
I have installed Intel parallel studio 2011 for linux(noncommercial) and it installed fortran compiler during installation.
now I had some fortran codes that I want to compile and run them in parallel. so as the tutorial said, I used ifort -parallel .f90 . it compiled without any error but when I try to execute it, it return an error that it cannot find libiomp5.so and it does not work at all.
please help me how can I run my programs parallel?
I have ubuntu lucid linux amd64 and installed build-essential and openmpi packages on it.
thank you in advance
0 Kudos
4 Replies
TimP
Honored Contributor III
923 Views
Quoting m2sam2003
cannot find libiomp5.so
I have ubuntu lucid linux amd64 and installed build-essential and openmpi packages on it.

Usually, this means you forgot to set the compiler environment variables (source /compilervars.sh). In particular, that would result in LD_LIBRARY_PATH environment variable including the path to the Intel compiler shared objects.
If you installed the pre-built openmpi from ubuntu repository, that would work only with the companion gfortran. You would need to configure and rebuild openmpi from source to use it with ifort. If you're not using MPI, the presence of the openmpi installation won't affect you.
0 Kudos
m2sam2003
Beginner
923 Views
thank you Tim for your attention,
but I had already sourced the compilervar and now LD_LIBRARY_PATH returns:

/opt/intel/composerxe-2011.0.084/compiler/lib/intel64:/opt/intel/composerxe-2011.0.084/mpirt/lib/intel64:/opt/intel/composerxe-2011.0.084/ipp/../compiler/lib/intel64:/opt/intel/composerxe-2011.0.084/ipp/lib/intel64:/opt/intel/composerxe-2011.0.084/compiler/lib/intel64:/opt/intel/composerxe-2011.0.084/mkl/lib/intel64:/opt/intel/composerxe-2011.0.084/tbb/lib/intel64//cc4.1.0_libc2.4_kernel2.6.16.21:/opt/paraviewopenfoam381/lib/paraview-3.8:/opt/openfoam171/lib/linux64GccDPOpt/openmpi-system:/usr/lib/openmpi/lib:/home/mohammad/OpenFOAM/mohammad-1.7.1/lib/linux64GccDPOpt:/opt/site/1.7.1/lib/linux64GccDPOpt:/opt/openfoam171/lib/linux64GccDPOpt:/opt/openfoam171/lib/linux64GccDPOpt/dummy

as I can see here the path to compiler lib,where I can find libiomp5.so, I don't know what else I must do to tell the compiler to use this library.
I have a second question about the number of processors. where I can specify processors No.?
thank you in advance,
0 Kudos
TimP
Honored Contributor III
923 Views
You should be able to verify whether libiomp5.so is correctly on PATH on each node (supposing you run MPI across a cluster) by rsh to that node and
ldd yourexecutable.
Number of ranks is specified by the -n or -np options in the mpirun or mpiexec command. If you are combining MPI and OpenMP, the number of thread per rank is set by the same OpenMP methods as for a pure OpenMP job, e.g. OMP_NUM_THREADS.
0 Kudos
m2sam2003
Beginner
923 Views
hi tim
thank you for your replies but I'm so confused!
the tutorial of guided parallelizing works perfectly and when I run the output file and it uses both of my core2due cpu cores and the cputime reduces about 50%. I don't specify number of cores to run and I don't use mpirun! supposing that without using "mpirun -np" and executing output file normally uses all of my cpu cores simultaneously, why my own fortran program doesn't run the same way and gives me the libiomp5.so error? when I want to run on my own cpu cores only, the PATH should be correct for any of cores!!
I've checked the paths and the libiomp5.so exists on lib/intel64 folder. so WHAT IS THE PROBLEM??
0 Kudos
Reply