Changeset 4896


Ignore:
Timestamp:
Apr 11, 2024, 11:08:29 AM (4 weeks ago)
Author:
abarral
Message:

Fix XIOS compile
Fix mpif90 netcdf compile
Fix local netcdf compile
Fix missing rebuild

Location:
BOL/script_install_amaury
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install_amaury/arch_local/arch-local-gfortran-parallel.fcm

    r4893 r4896  
    1111%BASE_FFLAGS         -cpp -ffree-line-length-0 -fdefault-real-8 -DNC_DOUBLE
    1212%BASE_CFLAGS         -w -std=c++11 -D__XIOS_EXCEPTION  # xios
    13 %BASE_LD             -Wl,-rpath=$(dirname $(readlink -f "$(which mpif90)"))/../lib:$(nf-config --prefix)/lib -lstdc++
     13# /!\ LD must be written in Makefile syntax
     14%BASE_LD             -Wl,-rpath=$(shell dirname $(readlink -f "$(which mpif90)"))/../lib:$(shell nf-config --prefix)/lib -lstdc++
    1415%BASE_INC            -D__NONE__  # xios
    1516
     
    2425
    2526%MPI_FFLAGS          -fcray-pointer
    26 %MPI_LD              -L$(dirname $(readlink -f "$(which mpif90)"))/../lib -lmpi
     27%MPI_LD              -L$(shell dirname $(readlink -f "$(which mpif90)"))/../lib -lmpi
    2728%OMP_LD              -fopenmp
    2829%OMP_FFLAGS          -fopenmp -fcray-pointer
  • BOL/script_install_amaury/arch_local/arch-local-gfortran.fcm

    r4892 r4896  
    1313%MPI_FFLAGS
    1414%OMP_FFLAGS
    15 %BASE_LD             -Wl,-rpath=$(nf-config --prefix)/lib
     15# /!\ LD must be written in Makefile syntax
     16%BASE_LD             -Wl,-rpath=$(shell nf-config --prefix)/lib
    1617%MPI_LD
    1718%OMP_LD
  • BOL/script_install_amaury/arch_local/arch-local-gfortran.path

    r4892 r4896  
    11NETCDF_INCDIR="$(nf-config --fflags)"
     2NETCDF_LIBDIR="$(nf-config --flibs)"
    23NETCDF_LIB="$(nf-config --flibs)"
    34NETCDF95_INCDIR="-I$LMDGCM/../../include"
  • BOL/script_install_amaury/install_lmdz.sh

    r4893 r4896  
    326326
    327327    # Adapt for XIOS, which uses different naming conventions
    328     # TODO >:c ugly fdefault-real-8 fix
    329328    sed -i'' -e "s/%COMPILER/%FCOMPILER/" -e "s/%LINK/%LINKER/" -e "s/-fdefault-real-8//" "$MODEL/modipsl/modeles/XIOS/arch/arch-$arch.fcm"
    330329}
     
    338337        cd "$MODEL"
    339338
    340         case $compiler in
    341           gfortran) opt1="-compiler gnu"; opt2="-CC gcc -FC gfortran -CXX g++";;
    342           ifort)  opt1="-compiler intel"; opt2="-CC icc -FC ifort -CXX icpc";;
    343           pgf90)  opt1="-compiler pgf90"; opt2="-CC pgcc -FC pgf90 -CXX pgCC";;
    344           *)      echo "unexpected compiler $compiler for netcdf"; exit 1
     339        # Convert non-basic compiler
     340        local ncdf_compiler="$compiler"
     341        case $compiler in  # TODO check if it works with other base compilers
     342            mpif90) ncdf_compiler=$($compiler --help | head -n 1 | cut -f 2 -d " ")
     343        esac
     344
     345        case $ncdf_compiler in
     346            gfortran) opt1="-compiler gnu"; opt2="-CC gcc -FC gfortran -CXX g++";;
     347            ifort)  opt1="-compiler intel"; opt2="-CC icc -FC ifort -CXX icpc";;
     348            pgf90)  opt1="-compiler pgf90"; opt2="-CC pgcc -FC pgf90 -CXX pgCC";;
     349            *)      echo "unexpected compiler $ncdf_compiler for netcdf"; exit 1
    345350        esac
    346351
     
    360365        fi
    361366
     367
    362368        echo "Repertoire netcdf $ncdfdir"
    363369        if [[ ! -d $ncdfdir ]]; then
     
    373379        fi
    374380
     381        # Add to path
     382        export PATH="$ncdfdir/bin:$PATH"
     383
    375384        #----------------------------------------------------------------------------
    376385        # LF rajout d'une verrue, pour une raison non encore expliquee,
     
    389398EOF
    390399
    391     if $compiler -I"$ncdfdir"/include test_netcdf90.f90 -L"$ncdfdir"/lib -lnetcdff \
     400    if $ncdf_compiler -I"$ncdfdir"/include test_netcdf90.f90 -L"$ncdfdir"/lib -lnetcdff \
    392401              -lnetcdf -Wl,-rpath="$ncdfdir"/lib && ./a.out
    393402    then
     
    416425}
    417426
    418 function install_IOIPSL {  # via fcm
     427function install_IOIPSL {
    419428    cd "$MODEL/modipsl/modeles/IOIPSL"
    420429    ioipsllog="$(pwd)/ioipsl.log"
     
    424433        echo "IOIPSL compile failed, exiting"; exit 1
    425434    fi
    426     cp lib/* ../../lib
     435
     436    # Link to modipsl/bin
     437    cp -f bin/* ../../bin
     438
    427439    echo "IOIPSL compiled $(date)"
    428440
Note: See TracChangeset for help on using the changeset viewer.