Compiling on Debian Stretch

All things involving the setup (compiling, NetCDF, etc.) of the WRF Model itself.

Compiling on Debian Stretch

Postby micha_silver » Sun Jun 25, 2017 7:37 am

I'm trying to compile WRF on a new Debian 9.0 server. Running the environment tests from:
http://www2.mmm.ucar.edu/wrf/OnLineTutorial/compilation_tutorial.php
I already hit a problem on test 4:

Code: Select all
micha@bidr-wrf:Fortran_tests$ gcc -c -m64 TEST_4_fortran+c_c.c
micha@bidr-wrf:Fortran_tests$ gfortran -c -m64 TEST_4_fortran+c_f.f90
micha@bidr-wrf:Fortran_tests$ gfortran -m64 TEST_4_fortran+c_f.o
TEST_4_fortran+c_f.o: In function `MAIN__':
TEST_4_fortran+c_f.f90:(.text+0x33): undefined reference to `c_test_'
collect2: error: ld returned 1 exit status
micha@bidr-wrf:Fortran_tests$

micha@bidr-wrf:Fortran_tests$ gfortran --version
GNU Fortran (Debian 6.3.0-18) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

micha@bidr-wrf:Fortran_tests$ gcc --version
gcc (Debian 6.3.0-18) 6.3.0 20170516
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Are the versions of gcc and gfortran too new? Any tips how to solve this?

Thanks, Micha
micha_silver
 
Posts: 1
Joined: Sun Jun 25, 2017 7:28 am

Re: Compiling on Debian Stretch

Postby msw17002 » Tue Jun 11, 2019 11:27 pm

If you haven't determined the problem yet (I know it has been over 2 years, but for reference sake!), you forgot to add additional syntax after this line of code:
'gfortran -m64 TEST_4_fortran+c_f.o'
It should be:
'gfortran -m64 TEST_4_fortran+c_f.o TEST_4_fortran+c_c.o'
then,
'./a.out'
I made this same mistake too!
msw17002
 
Posts: 5
Joined: Wed Nov 14, 2018 7:39 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 8 guests