LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-04-2016, 06:18 PM   #1
amini29
LQ Newbie
 
Registered: Sep 2016
Posts: 8

Rep: Reputation: Disabled
Fortran 90 compiler


Few years ago, I had been using fortran 90 on Red hat linux and it was working perfectly. I quit computation job for a while and now I am back to it. However, I switched to Ubuntu 16.4 and I installed gfortran but can't compile my program that I used to do it very easily. It seems that gfortran is not compatible with intel compiler. I used I use the command
f95 -O3 -C -tpp7 instead of ifort -O3 -C -tpp7. it compiles some modules but not all the way through. I get the following

guest-9xtqgp@majeed-ubuntu:~/binary100_C_azeo$ make clean

Removing all automatically generated files ...

guest-9xtqgp@majeed-ubuntu:~/binary100_C_azeo$ make
f95 -O3 -c globals.f90
f95 -O3 -c build_system.f90
f95 -O3 -c update.f90
f95 -O3 -c eventTree.f90
f95 -O3 -c process.f90
f95 -O3 -c run_system.f90
f95 -O3 -c crystal_melt.f90
crystal_melt.f90:37:25:

call random_seed(PUT=iseed)
1
Error: Size of ‘put’ argument of ‘random_seed’ intrinsic at (1) too small (2/12)
makefile:38: recipe for target 'crystal_melt.o' failed
make: *** [crystal_melt.o] Error 1
guest-9xtqgp@majeed-ubuntu:~/binary100_C_azeo$


Any clue of how I can fix this problem.

Thanks in advance
 
Old 09-04-2016, 08:13 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,870

Rep: Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487Reputation: 1487
You might check the fortran 95 reference. There are three options to the subroutine - and the PUT array size has to be greater than or equal to the size option.

The reference has an example of determining what the size must be:

https://gcc.gnu.org/onlinedocs/gfort..._005fSEED.html
 
1 members found this post helpful.
Old 09-05-2016, 04:47 AM   #3
amini29
LQ Newbie
 
Registered: Sep 2016
Posts: 8

Original Poster
Rep: Reputation: Disabled
I changed the iseed(2) to iseed(12) and it did work without error and could generate executable file.
Many thanks to you ipollard.
 
  


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
fortran compiler pb abd_bela Programming 1 09-13-2011 05:06 PM
fortran compiler sarayazdani Linux - Software 1 09-20-2008 12:59 PM
g77 in gcc 4.1.0 not found only gfortran fortran 95 compiler! I need fortran 77. TheBrick Linux - Software 3 07-04-2007 07:39 AM
Fortran compiler serafimg Ubuntu 1 01-28-2007 03:19 PM
does linux fortran compiler in fedora 4 support VAX FORTRAN? terrence Programming 17 08-31-2005 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:22 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
Open Source Consulting | Domain Registration