LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-02-2014, 10:41 AM   #1
sarasari
LQ Newbie
 
Registered: Feb 2014
Posts: 18

Rep: Reputation: Disabled
error in compiling +command to find netcdf path


Hi all,
I try to find the path where my netcdf is installed but I can't find it.

find netcdf
No such file or directory

which netcdf
/usr/no netcdf in (/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/fedora/bin)

locte netcdf
bash: locte: command not found...

whereis netcdf
netcdf:


but when I type:
which ncdump
/usr/bin/ncdump


I need to enter the correct path in gfortran part to compile a testcase and I think as the path is not correct, this error comes up:

make linux-gfort
make coherens "FC=gfortran" "FCOPTS= -O3" "FCDEFS=" "FCDEBUG=" \
"CPP=" "CPPF=cpp" "CPPOPTS=-traditional-cpp" "CPPDEFS=-DALLOC -DCDF"
make[1]: Entering directory `/home/fedora/models/work'
gfortran -I/usr/local/bin/include -O3 -c cf90_routines.f90 -o cf90_routines.o
COHERENS/code/source/cf90_routines.F90:37.13:

USE netcdf
1
Fatal Error: Can't open module file 'netcdf.mod' for reading at (1): No such file or directory
make[1]: *** [cf90_routines.o] Error 1
make[1]: Leaving directory `/home/fedora/models/work'
make: *** [linux-gfort] Error 2

any one knows what causes this error?
thanks group
 
Old 03-02-2014, 12:31 PM   #2
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
Example Fedora 20 : There are 34 netcdf packages :
http://dl.fedoraproject.org/pub/fedo...os/Packages/n/

Packages required at compile time are the <name>-devel packages :
netcdf-devel netcdf-fortran-devel netcdf-cxx-devel
netcdf-cxx4-devel netcdf-openmpi-devel netcdf-mpich-devel , etc.

* Howto list files from an installed package : $ rpm -ql <package-name>
Like $ rpm -ql netcdf

* Deciding if packages "netcdf" are installed : $ rpm -qa | grep netcdf

-

Last edited by knudfl; 03-02-2014 at 12:34 PM.
 
1 members found this post helpful.
Old 03-02-2014, 02:04 PM   #3
sarasari
LQ Newbie
 
Registered: Feb 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Example Fedora 20 : There are 34 netcdf packages :
http://dl.fedoraproject.org/pub/fedo...os/Packages/n/

Packages required at compile time are the <name>-devel packages :
netcdf-devel netcdf-fortran-devel netcdf-cxx-devel
netcdf-cxx4-devel netcdf-openmpi-devel netcdf-mpich-devel , etc.

* Howto list files from an installed package : $ rpm -ql <package-name>
Like $ rpm -ql netcdf

* Deciding if packages "netcdf" are installed : $ rpm -qa | grep netcdf

-
Thank you dear knudfl. but I've changed my fedora to 15.
and I have another question. could you please explain more about the first part? I dont get what you mean by mentioning the packages required at compile....
I'm very beginner..infact I don't know what to type in the path part at this part during compiling: gfortran -I/usr/share/doc/include ??? seems this path which I entered is not correct. how to know where my netcdf is installed?
 
Old 03-02-2014, 02:15 PM   #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
# 3 .
Quote:
I dont get what you mean by mentioning the packages required at compile ..
Compile time / build time :
Is when you compile some source code.
That's what you show in post #1 : The 'make' command calls e.g. gfortran →
.. and gfortran compiles the code.


Quote:
how to know where my netcdf is installed?
Read post #2 : $ rpm -ql netcdf


Quote:
I don't know what to type in the path part at this part during compiling :
gfortran -I/usr/share/doc/include ?
Why type anything, when you have a Makefile / are using make ?
Anyway -I/usr/share/doc/include looks wrong.
Which software is it you are trying to build ?

-
 
1 members found this post helpful.
Old 03-02-2014, 02:37 PM   #5
sarasari
LQ Newbie
 
Registered: Feb 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
I try to run one of the COHERENS software testcases which is an oceangraphy software.
when I typed rpm -ql netcdf I got:
/usr/bin/nccopy
/usr/bin/ncdump
/usr/bin/ncgen
/usr/bin/ncgen3
/usr/lib64/libnetcdf.so.6
/usr/lib64/libnetcdf.so.6.0.0
/usr/lib64/libnetcdf_c++.so.5
/usr/lib64/libnetcdf_c++.so.5.0.0
/usr/lib64/libnetcdff.so.5
/usr/lib64/libnetcdff.so.5.0.0
/usr/share/doc/netcdf
/usr/share/doc/netcdf-4.1.1
/usr/share/doc/netcdf-4.1.1/COPYRIGHT
/usr/share/doc/netcdf-4.1.1/README
/usr/share/doc/netcdf/ncdump-man-1.html
/usr/share/doc/netcdf/ncgen-man-1.html
/usr/share/doc/netcdf/ncgen3-man-1.html
/usr/share/doc/netcdf/netcdf-c.html
/usr/share/doc/netcdf/netcdf-c.info
/usr/share/doc/netcdf/netcdf-c.pdf
/usr/share/doc/netcdf/netcdf-c.ps
/usr/share/doc/netcdf/netcdf-c.txt
/usr/share/doc/netcdf/netcdf-cxx.html
/usr/share/doc/netcdf/netcdf-cxx.info
/usr/share/doc/netcdf/netcdf-cxx.pdf
/usr/share/doc/netcdf/netcdf-cxx.ps
/usr/share/doc/netcdf/netcdf-cxx.txt
/usr/share/doc/netcdf/netcdf-f77.html
/usr/share/doc/netcdf/netcdf-f77.info
/usr/share/doc/netcdf/netcdf-f77.pdf
/usr/share/doc/netcdf/netcdf-f77.ps
/usr/share/doc/netcdf/netcdf-f77.txt
/usr/share/doc/netcdf/netcdf-f90.html
/usr/share/doc/netcdf/netcdf-f90.info
/usr/share/doc/netcdf/netcdf-f90.pdf
/usr/share/doc/netcdf/netcdf-f90.ps
/usr/share/doc/netcdf/netcdf-f90.txt
/usr/share/doc/netcdf/netcdf-install.html
/usr/share/doc/netcdf/netcdf-install.info
/usr/share/doc/netcdf/netcdf-install.pdf
/usr/share/doc/netcdf/netcdf-install.ps
/usr/share/doc/netcdf/netcdf-install.txt
/usr/share/doc/netcdf/netcdf-man-3.html
/usr/share/doc/netcdf/netcdf-tutorial.html
/usr/share/doc/netcdf/netcdf-tutorial.info
/usr/share/doc/netcdf/netcdf-tutorial.pdf
/usr/share/doc/netcdf/netcdf-tutorial.ps
/usr/share/doc/netcdf/netcdf-tutorial.txt
/usr/share/doc/netcdf/netcdf.html
/usr/share/doc/netcdf/netcdf.info
/usr/share/doc/netcdf/netcdf.pdf
/usr/share/doc/netcdf/netcdf.ps
/usr/share/doc/netcdf/netcdf.txt
/usr/share/doc/netcdf/netcdf_f77-man.html
/usr/share/doc/netcdf/netcdf_f90-man.html
/usr/share/info/netcdf-c.info-1.gz
/usr/share/info/netcdf-c.info-2.gz
/usr/share/info/netcdf-c.info.gz
/usr/share/info/netcdf-cxx.info.gz
/usr/share/info/netcdf-f77.info-1.gz
/usr/share/info/netcdf-f77.info-2.gz
/usr/share/info/netcdf-f77.info.gz
/usr/share/info/netcdf-f90.info.gz
/usr/share/info/netcdf-install.info.gz
/usr/share/info/netcdf-tutorial.info.gz
/usr/share/info/netcdf.info.gz
/usr/share/man/man1/nccopy.1.gz
/usr/share/man/man1/ncdump.1.gz
/usr/share/man/man1/ncgen.1.gz
/usr/share/man/man1/ncgen3.1.gz

and that's what makes me confused. as I don't know which one is the right path to type.
 
Old 03-02-2014, 04:51 PM   #6
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
# 5 .

Well, you asked "how to know where my netcdf is installed?"
* But : netcdf does not provide the files you want.
* I.e. you want to compile some code : Install the required <packages>-devel.

Please use yum to know what's providing "netcdf.mod" :
$ yum provides */netcdf.mod
... And you should get a list of three packages (It's a Fedora 20 example again) →
netcdf-fortran-devel netcdf-fortran-mpich-devel netcdf-fortran-openmpi-devel
... then choose one and install it with # yum install <package-name>

Then you will discover if setting a path is required at all.

-

Last edited by knudfl; 03-02-2014 at 04:54 PM.
 
1 members found this post helpful.
Old 03-02-2014, 05:31 PM   #7
sarasari
LQ Newbie
 
Registered: Feb 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Thanks again I installed what you've said. but please consider this:
this is one part of my coherensflags.cmp file that in this part i'm asked to enter the netcdf path.

# options for compilation with CPP
## -DALLOC :allocates/deallocates local arrays
## -DMPI :includes MPI library
## -DCDF :includes netCDF library
## -DVERIF :enables output for verification procedure
## -DPETSC : includes PETSc library

CPPDFLAGS = -DALLOC -DCDF

# netCDF directory path
NETCDF_PATH = ???????????????????????????????? (this is the part that I have problem)


and when I compile it then the error in the first post comes up.
 
Old 03-03-2014, 06:12 AM   #8
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
# 7 . Please show some links to the used software.

"COHERENS software testcases which is an oceangraphy (oceanographic?) software":
1) COHERENS software testcases.
2) The `oceanographic software'.
3) PETSc http://www.mcs.anl.gov/petsc/ → ? Which PETSc version ?

And : Which version of Fedora ? Still Fedora 15 ?
Is it i686 or x86_64 ? → $ uname -m <Enter>

-
 
1 members found this post helpful.
Old 03-03-2014, 09:41 AM   #9
sarasari
LQ Newbie
 
Registered: Feb 2014
Posts: 18

Original Poster
Rep: Reputation: Disabled
Here you can find more information: http://www2.mumm.ac.be/coherens/
I use fedora 15 as it was compiling correctly before I switch on netcdf. and the problems come fter switching on netcdf. but I also have fedora 20 on my virtual machine but t couldnt compile correctly even when the netcdf switch was off, so thats why I decided to keep using fedora 15.
also my machine is x86_64. and I don't know how to find my petsc version.
thank you
 
  


Reply

Tags
petsc



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
netcdf-4.2.1.1 and netcdf-fortran-4.2 installation john.r.anderson3 Linux - Software 1 12-13-2012 06:37 AM
[SOLVED] Command path is in PATH but bash does not find the command. stf92 Linux - Newbie 17 03-23-2012 04:19 AM
How to exclude certain path from find command. UltraSoul Linux - Software 8 05-16-2009 06:26 PM
Compiling netcdf-3.6.2 on powerpc-ibm-aix5.2.0.0 samrat_rao AIX 3 04-30-2009 11:46 PM
Compiling errors with mythtv... make doesnt find correct path Samppa72 Linux - Software 2 08-17-2004 01:42 PM

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

All times are GMT -5. The time now is 03:03 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