LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2015, 12:03 AM   #1
unswliao
LQ Newbie
 
Registered: Dec 2015
Posts: 7

Rep: Reputation: Disabled
Problems with "Too many arguments in call to "


Hi

When I compile a .for fortran program in my centos 6.7 with gfortran compiler, the error that "Too many arguments in call to **** at (1)" always appear. However, the number of arguments in the subroutine when calling is same with the number when the subroutine is defined, so I am quite confused and do not know how to deal with this problem. Could anyone help me with this?

Regards,
 
Old 12-15-2015, 12:32 AM   #2
fu9ar
Member
 
Registered: Oct 2014
Location: Cyberinternetspace
Distribution: Slackware, mostly
Posts: 49

Rep: Reputation: 2
Share the code.
 
Old 12-15-2015, 12:38 AM   #3
unswliao
LQ Newbie
 
Registered: Dec 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fu9ar View Post
Share the code.
Hi

Thanks so much for your reply.

The attachment is a program by Prof. Brink from WHOI. It is freely available, so I think it is safe to post it here.

When I compile it with gfortran, the problem I described appear.

Kind regards,
Attached Files
File Type: txt BIGLOAD4.FOR-----BIGLOAD4_26113.txt (33.3 KB, 25 views)
 
Old 12-15-2015, 12:56 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Now we also need the precise error message - i.e. which function, and which line.
 
Old 12-15-2015, 01:09 AM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
I think I have a hint. I tried to compile the program as well, with the same error message (the subroutine in question is DTIME).

After uncommenting DTIME from the code, the same error message is issued. The compiler doesn't complain that DTIME is missing.
After replacing the name of this subroutine with blabla, compilation proceeds.

So, your error is most probably provoked by a library function DTIME that "masks" the subroutine DTIME in your source code. How to handle this best, I can't say, but renaming DTIME certainly works.

Note that I get another error message about a missing right parenthesis; perhaps because the parenthesis is too far on the right? I faintly remember that Fortran code lines mustn't be longer than seventysomething characters. Perhaps the GNU Fortran compiler has an option for that.

Last edited by berndbausch; 12-15-2015 at 01:10 AM.
 
2 members found this post helpful.
Old 12-15-2015, 02:12 AM   #6
unswliao
LQ Newbie
 
Registered: Dec 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thumbs up

Dear berndbausch

Thank you so much for your kind and detailed reply. When I changed the name DTIME into BALA, it works.

Yeah, I also encounter the second error you mentioned. It seems quite unreasonable.

Many thanks,
 
Old 12-16-2015, 05:31 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Col limit = 72 https://web.stanford.edu/class/me200...03_basics.html for old eg F77 std.
I beleive a modern FORTRAN compiler allows longer lines, but it may be a compile option , rather than the default.
 
Old 12-16-2015, 06:27 AM   #8
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by chrism01 View Post
I remember it was so that the last eight positions on a punch card could be used for numbering the cards. In case you fell down the stairs with a pack of cards in your hands, there were machines that could sort them. Not so much of an issue anymore nowadays.
 
1 members found this post helpful.
Old 12-16-2015, 05:05 PM   #9
unswliao
LQ Newbie
 
Registered: Dec 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thumbs up

Hi,berndbausch

I have made an alternative expression in replace, and it works well.

Many thanks for your kind reply.

Very best wishes
 
Old 06-28-2016, 05:35 PM   #10
Eric Sánchez
LQ Newbie
 
Registered: Jun 2016
Posts: 1

Rep: Reputation: Disabled
Bigload4

Hi, I'm sorry for the delayed answer. It is exciting find a person who work in the same CTW model!, I'm from Chile, I hope we can share the experience with the model (Or if you know a forum of this topic I'd appreciated that info! ). I run the CTW model too. For this questions it worked for me: "gfortran -ffixed-line-length-0 BIGLOAD4_26113.FOR -o BIGLOAD4_26113.out"
Best Regards!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php "system"-call to access tty port, "error accessing" wedz Linux - Software 3 05-22-2012 08:34 PM
Qt "cannot call constructor for""a function-style cast remove the redundant ::QBrush" Peterius Linux - Software 4 11-24-2010 05:57 PM
Make "Too many arguments in call to 'idate' ?? idk666 Linux - Software 1 11-08-2006 10:17 AM
Any way to get "Alice"; "Call of Duty" series and "Descent 3" to work? JBailey742 Linux - Games 13 06-23-2006 02:34 PM


All times are GMT -5. The time now is 04:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration