03-17-2011
Hi.
Let us step back a minute.
Quote:
Originally Posted by
LMHmedchem
... I am getting an error that there is no rule to make the fortran objects. This same method worked fine to move some cpp src files to a different sub directory. I am guessing this is an issue with the fortran includes (COMMON etc), but I would have expected the fortran to fail with a compiler error, not the linker to fail because the object never go compiled ...
If make thinks there is no rule, then the compiler would not get called, and so there could not be an error in compilation. If there is no compilation, then I would expect the linker to complain.
Could you explain more about "same method worked fine to move some cpp src files" -- are you saying that the makefile causes files to be moved? Or that you moved them and that a makefile for cpp worked correctly?
Do you have cpp and fortran source in the same directory, and have a single makefile for both the cpp and fortran codes?
Please post the
exact error message that you get -- copy and paste so you get all the characters.
The version of make you are using would also be useful.
cheers, drl
10 More Discussions You Might Find Interesting
1. Red Hat
Hi,
i am trying to install AMBER10 which is a molecular dynamcis package onto two linux red hat pcs. I can successfully install the tools that comes with which uses gcc to compile, however AMBER10 requires either g95 or gfortran to compile. This is where the issue lies, i have installed both... (0 Replies)
Discussion started by: olifu02
0 Replies
2. Programming
How I can get the current make-file name in a make-file
So, if I run make with specified file:make -f target.mak
is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Discussion started by: alex_5161
2 Replies
3. Programming
Hi!
I have a program in fortran77. This program was compiled with pgf90, but now, I need compiled it with gfortran.
I show a bit of code.
program hello
PARAMETER(a=100)
integer a
write(*,*)'value ', a
end program hello
What's the problem?
Thanks (2 Replies)
Discussion started by: kekaes
2 Replies
4. Programming
Hi !
I have one program made of several sub programs which I am trying to compile with gfortran on Fedora 14 in my system. The program was originally written in Fortran 77 and compilation command used to be -
fort77 -O2 -f -w -o life life_com.f lifetime.f minuit.f tek_life.f utilities.f... (0 Replies)
Discussion started by: cylab123
0 Replies
5. Programming
Hi,
I am trying to run a simple f77 program on gfortran. Program is as follows.
program trial
implicit real*8 (a-h,o-z)
common/var/a(2),b,c(4),d
a=(/0,0/)
b=0
c=(/0,0,0,0/)
d=0
call add(a,b,c,d)
... (1 Reply)
Discussion started by: anshulfy
1 Replies
6. Programming
I am a INTEL fortran user recently migrated to linux and installed gfortran on my system.
I run numerical models as part of my research.
my question is on optimization of the fortran code.
I used the - vectorize option to compile for reducing the run time considerably and was happy. But... (1 Reply)
Discussion started by: schamarthi1
1 Replies
7. Programming
Hello everyone,
I'm trying since a few days to compile a f90 program with gfortran (on Ubuntu) with a makefile. The fortran program calls 2 routines written in C.
Here is my makefile:
FC = gfortran
SFC = gfortran
FFLAGS = -ffree-form -O... (21 Replies)
Discussion started by: leroygr
21 Replies
8. Programming
I have code that works fine in ifort. But when trying to run on gfortran 4.7.1 (which does support quads and has no problem with real * 16) I can't cast an integer variable to a quad precision float (real*16) using something like:
factq(i) = factq(i-1) * qfloat(i)
Finding a list of the new... (2 Replies)
Discussion started by: vibrantcascade
2 Replies
9. Programming
Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
@for subdir in */Makefile; \
do \... (1 Reply)
Discussion started by: Revathi R
1 Replies
10. Solaris
Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
@for subdir in */Makefile; \
do \... (1 Reply)
Discussion started by: Revathi R
1 Replies
LEARN ABOUT DEBIAN
debian-matlab-mexhelper
DEBIAN-MATLAB-MEXHELPER(1) User Commands DEBIAN-MATLAB-MEXHELPER(1)
NAME
debian-matlab-mexhelper - helper to build Matlab extensions on Debian
SYNOPSIS
debian-matlab-mexhelper [OPTIONS] <package name> <mode>
DESCRIPTION
The is a small helper that eases building and installing MEX extensions for Matlab toolbox packages in Debian binary packages. Because
these packages cannot build-depend on Matlab (for obvious reasons) they need to compile their extensions at installation time using a local
Matlab installation. The helper is somewhat flexible by supporting custom build, install and clean commands, as well as source and destina-
tion directories. It also deals with moving extensions into library directories and automatically symlinks them into the toolbox direc-
tory.
There are two major modes: 'install' to build, install and symlink extensions (useful in postinst) and 'clean' to remove installed exten-
sions and symlinks (useful in prerm).
The command to build the extensions is invoked in the source directory. By default, this is /usr/src/matlab/<package name>, but can be
overridden with the --src-dir option. Any optional 'install' (--install-cmd) and 'clean' (--clean-cmd) are invoked in the source directory
too.
Moreover, this helper will also take any installed extensions from a default installation path /usr/share/matlab/site/m/<package name>,
move them into /usr/lib/matlab/site/<package name> and symlink back to the original location. These locations can be configured with the
--m-dir and --mex-dir options respectively. Again, this step is optional and is only performed if a package actually installs extensions
inot this location.
OPTIONS
-h
Print usage summary and option list.
--help
Print full help.
--version
Print version information and exit.
--build-cmd
Command to build the extensions in the source directory
--install-cmd
Command to install the extensions after building
--clean-cmd
Command to clean the source tree after installation. This is not the command that is executed in 'clean' mode.
--src-dir
Directory with the extension sources. This is also the directory in which build, install and clean commands get invoked.
--mex-dir
Target directory into which binary extensions get moved.
--m-dir
Target directory in which symlinks to binary extensions get created.
--make
Set default commands for 'build-cmd' (make), 'install-cmd' (make install DESTDIR=$m_dir) and 'clean-cmd' (make distclean) if no spe-
cific command has been provided via the respective options.
EXAMPLES
The following call can be used in a package's postinst script if it comes with a Matlab script 'build_matlab.m' that builds and installs
its extension into the desired locations. The --src-dir option is used to point to a non-standard location of the extension sources.
debian-matlab-mexhelper somepackagename install
--src-dir /usr/src/dynare-matlab/mex/sources --build-cmd 'matlab -nodesktop -nodisplay -nojvm -r build_matlab'
If a package installs extension sources into the standard location and builds its extensions using a Makefile that support the DESTDIR for
installing the built extensions and a 'distclean' target it is sufficient to run the following.
debian-matlab-mexhelper somepackagename install --make
Otherwise it is also possible to fully customize all commands.
debian-matlab-mexhelper difficultpackage install
--build-cmd 'make -C src all toolbox MEXBIN="matlab-mex"' --install-cmd 'make -C src install && find . ! -wholename "./src"
-name "*.mex?*" -print0 | xargs -0 -I {} cp -v --parent {} /usr/share/difficultpackage' --clean-cmd 'make -C src distclean tool-
box-distclean && find . -name "*.mex?*" -delete'
If a package uses debian-matlab-mexhelper to install extensions into the standard location it can also be used to remove all MEX extensions
and created symlinks when a package is removed from a system. To achieve this simply put the following call into a package's prerm script.
debian-matlab-mexhelper packagename clean
AUTHOR
Written by Michael Hanke.
COPYRIGHT
Copyright (C) 2010-2011 Michael Hanke <michael.hanke@gmail.com>
Licensed under GNU Public License version 3 or later.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
LAR PURPOSE.
debian-matlab-mexhelper 0.0.18 March 2012 DEBIAN-MATLAB-MEXHELPER(1)