LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-17-2020, 10:28 AM   #1
dulap
LQ Newbie
 
Registered: Jan 2020
Posts: 4

Rep: Reputation: Disabled
Question gfortran compile error


I'm new to linux and I tried to compile OTIS (OSU Tidal Inversion Software) on Ubuntu. I got following error. How could I solve this?

deallocate(zeq0%z,zeq0%mz,zeq0%cid%idc,zeq0%cid%cons,&
1
zeq0%cid%group,zeq0%cid,zeq0,P)
2
Error: Allocate-object at (1) is subobject of object at (2)
ZEQset_NPG.f90:123:24:

deallocate(zeq0%z,zeq0%mz,zeq0%cid%idc,zeq0%cid%cons,&
1
zeq0%cid%group,zeq0%cid,zeq0,P)
2


Thanks
 
Old 01-18-2020, 12:36 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,289

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Welcome to LQ, dulap.

Fortran? That's a weird one. Are you sure the compiler is installed? To check, run
Code:
ls /usr/bin/gcc*
and look for gcc-fortran unless you're using some other compiler. Have you a link to that software?

Your output makes no sense to me. It looks more like a crash, or a rubbish in --> rubbish out scenario.
Next the package: you did follow the instructions for compiling? (usually ./configure {lots of options}; make; sudo make install). If they're using cmake or any other build system, let us know

Run 'make clean', and follow the instructions. If it pukes again, in the terminal, hit up-arrow and return, and post the entire output.
 
1 members found this post helpful.
Old 01-18-2020, 03:47 PM   #3
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,801

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by dulap View Post
I'm new to linux and I tried to compile OTIS (OSU Tidal Inversion Software) on Ubuntu. I got following error. How could I solve this?

deallocate(zeq0%z,zeq0%mz,zeq0%cid%idc,zeq0%cid%cons,&
1
zeq0%cid%group,zeq0%cid,zeq0,P)
2
Error: Allocate-object at (1) is subobject of object at (2)
ZEQset_NPG.f90:123:24:

deallocate(zeq0%z,zeq0%mz,zeq0%cid%idc,zeq0%cid%cons,&
1
zeq0%cid%group,zeq0%cid,zeq0,P)
2


Thanks
I haven't used the Fortran allocate/deallocate statements before but from I have read about it, it seems to be a way of doing dynamic memory allocation (similar to malloc/free in C). My guess is that what is being deallocated would break some other allocated bit of memory that depends on it.

I may be wrong (and often am; just ask the missus) but my guess is that this is a little too "niche" for a helpful response from LQ users. My gut tells me that without knowing the internals of what you're trying to compile you're probably going to have to find a user group that knows about this software package in detail and pick their collective brains. I was thinking of downloading the source tar archive but, frankly, I'm balking at downloading 664MB of compressed sources from the site in hopes of finding a 'README.1st' file to look for clues to your problem. (I'm a bit surprised someone is still using 'compress'; kind of old-school.) There are email addresses on the project site at Oregon State---you might consider shooting a note to one of them an email asking for a name/email address of someone you can contact with questions about compiling the sources.

Good luck...
 
1 members found this post helpful.
Old 01-19-2020, 06:35 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
@dulap : Please specify Ubuntu version.

The OTIS program has time stamps `2013´. You may need an older compiler.

My test :
Code:
$ cd OTISoo/bin  
      ## edit 'makefile' line 23 to gfortran45 (version gcc-4.5.4)
$ make linux.all         ## the terminal output is attached
Result :
Code:
OTISoo/bin/
├── bhat_samp
├── data_cooker
├── Diffuse
├── Fwd_fac
├── Lat_lon
├── Makedat
├── mkB
├── mkFrv
├── mk_g_ll
├── mk_grid
├── ob_eval
├── reduce_B
├── repX
├── rlcX
├── rpx_to_rp
├── Scfac
├── Sml_df
├── stats_rlz
├── Sumreps
└── Varest
Using gfortran version 9.2.0 fails.
The error output is very different from your errors.
Reason :
Might be caused by the special Debian patching used by Ubuntu (the 100? gcc patches.)
I.e. an original gcc/g++/gfortran happens to work better with old programs.
-
Attached Files
File Type: txt OTIS-make-output.txt (31.0 KB, 14 views)
 
1 members found this post helpful.
Old 01-20-2020, 11:04 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
OTIS fails with the default gfortran in Ubuntu 12.04, 14.04, 16.04, 18.04 .
OTIS compiles the 20 executable with gfortran-4.4 in the tested Ubuntu versions :
Edit `makefile´ line 23 to gfortran-4.4

`gfortran-4.4´ is not available for e.g. Ubuntu 18.04 : Install from file →
4 packages: gfortran-4.4_4.4.7-8ubuntu.tar
https://drive.google.com/file/d/1WCK...ew?usp=sharing

Download, unpack .... and install :
Code:
sudo apt install libgfortran3
sudo dpkg -i cpp-4.4_4.4.7-8ubuntu1_amd64.deb gcc-4.4_4.4.7-8ubuntu1_amd64.deb gcc-4.4-base_4.4.7-8ubuntu1_amd64.deb gfortran-4.4_4.4.7-8ubuntu1_amd64.deb

Last edited by knudfl; 01-20-2020 at 12:02 PM.
 
1 members found this post helpful.
Old 01-20-2020, 04:06 PM   #6
dulap
LQ Newbie
 
Registered: Jan 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up

@knudfl: I successfully compiled OTIS thanks to your great help. Thank a lot for spending your valuable time with this problem.
 
Old 01-20-2020, 04:09 PM   #7
dulap
LQ Newbie
 
Registered: Jan 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
@business_kid: Thanks for your reply. I succeeded instruction given by knudfl
 
Old 01-20-2020, 04:12 PM   #8
dulap
LQ Newbie
 
Registered: Jan 2020
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thumbs up

@rnturn: Thanks for your instructions. I solved problem using the posts from knudfl
 
  


Reply

Tags
osu tidal inversion, otis



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
gfortran compiles old fortran 4 code; gfortran gives errors. Why? Fpaul8 Linux - Software 2 08-01-2019 10:09 PM
gfortran compiles old fortran 4 code; gfortran gives errors. Why? Fpaul8 Linux - Newbie 2 07-29-2019 08:48 AM
Gfortran compile error aukuntin Linux From Scratch 2 01-28-2007 08:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:32 AM.

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