Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using gFORTRAN to compile something built for g77 Post 302807923 by drl on Wednesday 15th of May 2013 03:29:02 PM
Old 05-15-2013
Hi.

OK, so the standard libraries are available and getting linked. That suggests that you are missing some local libraries.

When you look at the Makefile, and particularly the final link -- could be gfortran, gcc, or ld -- are there other libraries mentioned? ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. AIX

g77??

hello aixperts, I really need g77 on an aix 5L 5.3 system as I do not have xlf right now, is there any way by which I can get it? eagerly waiting for the reply, MzZt. (1 Reply)
Discussion started by: mzzt
1 Replies

2. Red Hat

g77 compiler: where it is for red hat? solved

Hi all In order to build a library the g77 fortran compiler is required. I know that it is very old, but this is the requirement in order to compile this package and it seems not possible to move away from it. The problem is that I really don't know where to get this old package! I tried in... (0 Replies)
Discussion started by: manustone
0 Replies

3. Programming

Fortran 77 and gfortran

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. UNIX for Dummies Questions & Answers

Compiling gcc to compile make to compile yaboot

I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies

5. Programming

Two issues in make file, g++, gfortran

Question 1: I have a c++ project that I am trying to re-organize. I am trying to subdivide the src directory to move some src files that seldom are changed to a more out of the way location. The project is a c++ application with a fortran function called from the c. The reorganization went... (9 Replies)
Discussion started by: LMHmedchem
9 Replies

6. Programming

f77 program on gfortran

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

7. Programming

Gfortran compiler options.

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

8. Programming

Compilation problem with gfortran

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

9. Programming

g++ and g77 compile for OSX

I have an app based on g++ and g77 that I would like to compile for OSX. My understanding is that OSX is linux of some flavor under the hood and have seen OSX users running bash shells and such. Is there a tutorial of some kind out there that someone could point me to on the subject? LMHmedchem (7 Replies)
Discussion started by: LMHmedchem
7 Replies

10. Programming

gfortran 4.7, no support for qfloat?

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
HYBRJ_(3)						     Library Functions Manual							 HYBRJ_(3)

NAME
hybrj_, hybrj1_ - find a zero of a system of nonlinear function SYNOPSIS
#include <minpack.h> void hybrj1_ (void (*fcn)(int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag), int *n, double *x, double *fvec, double *fjac, int *ldfjac, double *tol, int *info, double *wa, int *lwa); void hybrj_ (void (*fcn)(int *n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag), int *n, double *x, double *fvec, double *fjac, int *ldfjac, double *xtol, int *maxfev, double *diag, int *mode, double *factor, int *nprint, int *info, int *nfev, int *njev, double *r, int *lr, double *qtf, double *wa1, double *wa2, double *wa3, double *wa4); DESCRIPTION
The purpose of hybrj_ is to find a zero of a system of n nonlinear functions in n variables by a modification of the Powell hybrid method. The user must provide a subroutine which calculates the functions and a subroutine which calculates the Jacobian. hybrj1_ serves the same function but has a simplified calling sequence. Language notes hybrj_ and hybrj1_ are written in FORTRAN. If calling from C, keep these points in mind: Name mangling. With g77 version 2.95 or 3.0, all the function names end in an underscore. This may change with future versions of g77. Compile with g77. Even if your program is all C code, you should link with g77 so it will pull in the FORTRAN libraries automatically. It's easiest just to use g77 to do all the compiling. (It handles C just fine.) Call by reference. All function parameters must be pointers. Column-major arrays. Suppose a function returns an array with 5 rows and 3 columns in an array z and in the call you have declared a leading dimension of 7. The FORTRAN and equivalent C references are: z(1,1) z[0] z(2,1) z[1] z(5,1) z[4] z(1,2) z[7] z(1,3) z[14] z(i,j) z[(i-1) + (j-1)*7] Parameters for both functions fcn is the name of the user-supplied subroutine which calculates the functions. In FORTRAN, fcn must be declared in an external statement in the user calling program, and should be written as follows: subroutine fcn(n,x,fvec,fjac,ldfjac,iflag) integer n,ldfjac,iflag double precision x(n),fvec(n),fjac(ldfjac,n) ---------- if iflag = 1 calculate the functions at x and return this vector in fvec. do not alter fjac. if iflag = 2 calculate the jacobian at x and return this matrix in fjac. do not alter fvec. --------- return end In C, fcn should be written as follows: void fcn(int n, double *x, double *fvec, double *fjac, int *ldfjac, int *iflag) { /* if iflag = 1 calculate the functions at x and return this vector in fvec. do not alter fjac. if iflag = 2 calculate the jacobian at x and return this matrix in fjac. do not alter fvec. */ } The value of iflag should not be changed by fcn unless the user wants to terminate execution of hybrj_. In this case set iflag to a nega- tive integer. n is a positive integer input variable set to the number of functions and variables. x is an array of length n. On input x must contain an initial estimate of the solution vector. On output x contains the final estimate of the solution vector. fjac is an output n by n array which contains the orthogonal matrix q produced by the qr factorization of the final approximate jacobian. ldfjac is a positive integer input variable not less than n which specifies the leading dimension of the array fjac. fvec is an output array of length n which contains the functions evaluated at the output x. Parameters for hybrj1_ tol is a nonnegative input variable. Termination occurs when the algorithm estimates that the relative error between x and the solution is at most tol. info is an integer output variable. If the user has terminated execution, info is set to the (negative) value of iflag. See description of fcn. Otherwise, info is set as follows. info = 0 improper input parameters. info = 1 algorithm estimates that the relative error between x and the solution is at most tol. info = 2 number of calls to fcn has reached or exceeded 200*(n+1). info = 3 tol is too small. No further improvement in the approximate solution x is possible. info = 4 iteration is not making good progress. wa is a work array of length lwa. lwa is a positive integer input variable not less than (n*(3*n+13))/2. Parameters for hybrj_ xtol is a nonnegative input variable. Termination occurs when the relative error between two consecutive iterates is at most xtol. maxfev is a positive integer input variable. Termination occurs when the number of calls to fcn is at least maxfev by the end of an itera- tion. diag is an array of length n. If mode = 1 (see below), diag is internally set. If mode = 2, diag must contain positive entries that serve as multiplicative scale factors for the variables. mode is an integer input variable. If mode = 1, the variables will be scaled internally. If mode = 2, the scaling is specified by the input diag. Other values of mode are equivalent to mode = 1. factor is a positive input variable used in determining the initial step bound. This bound is set to the product of factor and the eu- clidean norm of diag*x if nonzero, or else to factor itself. In most cases factor should lie in the interval (.1,100.). 100. Is a generally recommended value. nprint is an integer input variable that enables controlled printing of iterates if it is positive. In this case, fcn is called with iflag = 0 at the beginning of the first iteration and every nprint iterations thereafter and immediately prior to return, with x and fvec avail- able for printing. If nprint is not positive, no special calls of fcn with iflag = 0 are made. info is an integer output variable. If the user has terminated execution, info is set to the (negative) value of iflag. See description of fcn. Otherwise, info is set as follows. info = 0 improper input parameters. info = 1 relative error between two consecutive iterates is at most xtol. info = 2 number of calls to fcn has reached or exceeded maxfev. info = 3 xtol is too small. No further improvement in the approximate solution x is possible. info = 4 iteration is not making good progress, as measured by the improvement from the last five jacobian evaluations. info = 5 iteration is not making good progress, as measured by the improvement from the last ten iterations. nfev is an integer output variable set to the number of calls to fcn. fjac is an output n by n array which contains the orthogonal matrix q produced by the qr factorization of the final approximate jacobian. ldfjac is a positive integer input variable not less than n which specifies the leading dimension of the array fjac. r is an output array of length lr which contains the upper triangular matrix produced by the qr factorization of the final approximate Ja- cobian, stored rowwise. lr is a positive integer input variable not less than (n*(n+1))/2. qtf is an output array of length n which contains the vector (q transpose)*fvec. wa1, wa2, wa3, and wa4 are work arrays of length n. SEE ALSO
hybrd(3), hybrd1(3). AUTHORS
Burton S. Garbow, Kenneth E. Hillstrom, Jorge J. More. This manual page was written by Jim Van Zandt <jrv@debian.org>, for the Debian GNU/Linux system (but may be used by others). Minpack March 8, 2002 HYBRJ_(3)
All times are GMT -4. The time now is 06:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy