Re: g77 and MXUNIT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To answer my own email, I just figured out the problem. Hopefully I can explicitly explain it so if any other amatuers run into this problem it can be solved easily.

The problem was is that the libraries generated were installed into the /usr/local/lib and /usr/local/lib64 directories, instead of /usr/lib64 and /usr/lib/gcc/x86_64-redhat-linux/3.4.2/ .

So, all you need to do is copy /usr/local/lib64/libg2c* to the afformentioned directories and life is grand.

-Ben


On Wed, 29 Dec 2004, Benjamin Joseph wrote:

So I have this problem, and I was wondering if anyone knew how to solve this. My Fortran program compiles, but at run time I get an error message:
--------------
open: illegal unit number
apparent state: unit 99 named FOO$099
lately writing direct unformatted external IO
--------------


By googling, I found out that in OPEN statements the logical unit numbers are by default limited from 1 to 99 (in gcc), and this program exceeds that number (goes to 112 I think). The solution for this seems to involve recompiling gcc but with gcc/libf2c/libI77/fio.h changed so that

#define MXUNIT 100   ------->  #define MXUNIT 1000

or something bigger than 100, anyway. Okay, so I do that, and I recompile gcc:

../gcc-3.4.3/configure
make -j 2 bootstrap
su
make install

I then recompile my code and try to run it and there is no change, I get the same error. I'm not sure if my compiler options are correct, perhaps it is not linking to the right libraries? Btw the code works, but we've compiled it before with the Intel Fortran compiler. I've also made sure that any old versions of g77 have been removed so that this new one is the only one there.

Does anyone have any suggestions?

I'm running a dual-processor opteron, FC3 x86_64.

-Ben



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux