- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
I'm trying to define the makefile for compiling the programm in Linux that uses Fortran Compiler. In the programm manual it is written that it requires FORTRAN90 compiler and MPI. I've installed Intel Parallel Sdudio 2015 and openMPI. The target template in the makefile looks like this:
# Generic target template
#=====================================================================
uknown_platform:
$(MAKE) LD="path to FORTRAN90 Linker-loaDer" \
LDFLAGS="appropriate flags for LD (MPI libraries)" \
FC="path to FORTRAN90 compiler" \
FCFLAGS="appropriate flags for FC (MPI include)" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
I have Parallel Studio installed in /opt/intel.
All the pathes are added to bashrc file
PATH=$PATH:/opt/intel/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib (the pass to the openMPI libraries)
PATH=$PATH:/opt/intel/impi_latest/bin64
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/impi_latest/lib64
When runing the makefile for stantart target from makefile
#================== Cambridge HPC - darwin (Woodcrest) ==============
hpc:
$(MAKE) LD="mpif90 -o" LDFLAGS="-O3" \
FC="mpif90 -c" FCFLAGS="-O3" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
I get an error :
tata@linux-ennu:~/dl_poly_4.06/source> sudo make hpc
root's password:
make LD="mpif90 -o" LDFLAGS="-O3" \
FC="mpif90 -c" FCFLAGS="-O3" \
EX=DLPOLY.Z BINROOT=../execute master
make[1]: Entering directory `/home/tata/dl_poly_4.06/source'
DL_POLY_4 compilation in MPI mode
'Use mpi_module' must change to 'Use mpi' in 'comms_module.f90'
mpif90 -c -O3 kinds_f90.f90
make[1]: mpif90: Command not found
make[1]: *** [kinds_f90.o] Error 127
make[1]: Leaving directory `/home/tata/dl_poly_4.06/source'
make: *** [hpc] Error 2
tata@linux-ennu:~/dl_poly_4.06/source> cd \
Than I've tried customizing the target in Makefile:
uknown_platform:
$(MAKE) LD="/opt/intel/impi_latest/bin64/mpif90 -o" \
LDFLAGS="-03" \
FC="/opt/intel/impi_latest/bin64/mpif90 -c" \
FCFLAGS="-03" \
EX=$(EX) BINROOT=$(BINROOT) $(TYPE)
That again leaded to the error:
tata@linux-ennu:~/dl_poly_4.06/source> sudo make uknown_platform
root's password:
make LD="/opt/intel/impi_latest/bin64/mpif90 -o" \
LDFLAGS="-03" \
FC="/opt/intel/impi_latest/bin64/mpif90 -c" \
FCFLAGS="-03" \
EX=DLPOLY.Z BINROOT=../execute master
make[1]: Entering directory `/home/tata/dl_poly_4.06/source'
DL_POLY_4 compilation in MPI mode
'Use mpi_module' must change to 'Use mpi' in 'comms_module.f90'
/opt/intel/impi_latest/bin64/mpif90 -c -03 kinds_f90.f90
/opt/intel/impi_latest/bin64/mpif90: line 581: gfortran: command not found
/opt/intel/impi_latest/bin64/mpif90: line 760: gfortran: command not found
make[1]: *** [kinds_f90.o] Error 127
make[1]: Leaving directory `/home/tata/dl_poly_4.06/source'
make: *** [uknown_platform] Error 2
tata@linux-ennu:~/dl_poly_4.06/source>
I'm not very sure why do I get messages concerning gfortran. I haven't installed it and for configuring openMPI used ifort. Do I have any wrong parameters in the Makefile?
Regards
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check the documentation for your version of sudo. On most systems, sudo without options does not preserve the caller's environment; in particular, $PATH is not preserved, which would cause the make to fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the answer. I'll check it. At the same time I guess that the problem is in something else. Even if I write down all the pathes in the makefile (uknown_platform in makefile) the problem is still there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page