- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi I am using using LInux system to compile the fortran code. I have around 200 subroutines that I need to compile. Whiel I try to compile the subroutines it gives the error In function "Main" .......... undefined references to 'subroutinename". I have bunch of same error. This is the same code that worked perfectly on visual studio in windows. I am new to linux. Actually, I need to compile this code so that I could be able to run the code on supercomputer. Please help me .......
I have uploaded a snapshot of the error on http://www.filedropper.com/errorinlinux. I am using SecureCRT interface to compile the code in Supercomputer.
Thanks.
JDBABA
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you want the compiler to compile Fortran source into object code but refrain from linking, you should use the -c compiler flag. Then, when all the necessary source have been compiled, you can issue the command
$ ifort *.o -o myexe
or something similar.
$ ifort *.o -o myexe
or something similar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi meceej4,
THanks for the suggestion. I followed your suggestion and first of all I compiled all the codes with -c compiler flag and then I used the command ifort *.o -o program. I didn't use $ before ifort. What does that mean ?
After I compiled the code then I tried to run the compiled code. However, it gives error like :
forttl : No such file or directory
fortt1 : severed (29): file not found, unit 1
Acutally I have the input file on the same folder. I don't know why I am getting such error ? Any help is appeciated.
fortt1 : severed (29): file not found, unit 1
Acutally I have the input file on the same folder. I don't know why I am getting such error ? Any help is appeciated.
Jdbaba
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The $ quoted by mecej4 presumably refers to the shell prompt.
How do you attach your input file to Fortran unit 1? The most portable way is by OPEN. By default, the file would need read and write permission. You could specify OPEN(action=read....) if you don't intend to allow file modification. In linux, the file name will be case-sensitive, and you will want to assure that it doesn't include invisible characters.
How do you attach your input file to Fortran unit 1? The most portable way is by OPEN. By default, the file would need read and write permission. You could specify OPEN(action=read....) if you don't intend to allow file modification. In linux, the file name will be case-sensitive, and you will want to assure that it doesn't include invisible characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tim,
Thank you so much for your reply. It seemed like I didn't care about the case of the input files. I just used the input files that I created in WINDOWS. LINUX needed all the capital case input files and I had lower case input files. THe problem is now solved. Thanks so much.
Jdbaba

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