Changeset 4238


Ignore:
Timestamp:
Sep 7, 2022, 7:43:49 PM (20 months ago)
Author:
lguez
Message:

Add test of compilation and execution with NetCDF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install_lmdz.sh

    r4237 r4238  
    663663fi
    664664
     665cat >test_netcdf90.f90 <<EOF
     666use netcdf, only: nf90_inq_libvers
     667print *, "NetCDF library version: ", nf90_inq_libvers()
     668end
     669EOF
     670
     671$compiler -I$ncdfdir/include test_netcdf90.f90 -L$ncdfdir/lib -l netcdff \
     672          -lnetcdf && ./a.out
     673   
     674if (($? == 0))
     675then
     676    rm test_netcdf90.f90 a.out
     677else
     678    echo "Failed test program using NetCDF-Fortran."
     679    echo "You can:"
     680    echo "- check that you have NetCDF-Fortran installed in your system"
     681    echo "- or specify an installation directory with option -netcdf of" \
     682         "install_lmdz.sh"
     683    echo "- or download and compile NetCDF-Fortran with option -netcdf 1 of" \
     684         "install_lmdz.sh"
     685    exit 1
     686fi
     687
    665688#=========================================================================
    666689if [[ ! -f $MODEL/modipsl/lib/libioipsl.a ]]
Note: See TracChangeset for help on using the changeset viewer.