* g77 and MXUNIT
@ 2004-12-30 2:10 Benjamin Joseph
2004-12-30 7:05 ` Benjamin Joseph
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Joseph @ 2004-12-30 2:10 UTC (permalink / raw)
To: gcc-help
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: g77 and MXUNIT
2004-12-30 2:10 g77 and MXUNIT Benjamin Joseph
@ 2004-12-30 7:05 ` Benjamin Joseph
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Joseph @ 2004-12-30 7:05 UTC (permalink / raw)
To: gcc-help
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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-30 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-30 2:10 g77 and MXUNIT Benjamin Joseph
2004-12-30 7:05 ` Benjamin Joseph
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).