New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
configure in vendors/XMLIO_SERVER/current – NEMO

source: vendors/XMLIO_SERVER/current/configure @ 3427

Last change on this file since 3427 was 2765, checked in by smasson, 13 years ago

Load working_directory into vendors/XMLIO_SERVER/current.

  • Property svn:executable set to *
File size: 3.7 KB
Line 
1#!/bin/csh
2set verbose echo
3set has_arch_opt           = FALSE
4set has_compile_opt        = FALSE
5set default_compile_flags  = "%PROD_FFLAGS"
6set has_use_vt             = FALSE
7set has_oasis              = FALSE
8set has_no_mpi             = FALSE
9
10top:
11if ($#argv > 0) then
12    switch ($1)
13
14    case -h
15
16########################################################################
17# Manuel en ligne
18########################################################################
19more <<eod
20
21
22configure_ioserver [Options]
23
24bla, bla, bla
25eod
26exit
27
28########################################################################
29# Lecture des differentes options
30########################################################################
31                   
32    case -a
33    case -arch
34        set has_arch_opt = TRUE
35        set arch="$2" ; shift ; shift ; goto top
36
37    case -prod
38        set has_compile_opt = TRUE
39        set compile_flags="%PROD_FFLAGS"
40        shift ; goto top
41
42    case -dev
43        set has_compile_opt = TRUE
44        set compile_flags="%DEV_FFLAGS"
45        shift ; goto top
46
47    case -debug
48        set has_compile_opt = TRUE
49        set compile_flags="%DEBUG_FFLAGS"
50        shift ; goto top
51
52    case -use_vt
53        set has_use_vt = TRUE
54        shift ; goto top
55       
56    case -oasis
57        set has_oasis = TRUE
58        shift ; goto top
59
60    case -no_mpi
61        set has_no_mpi = TRUE
62        shift ; goto top
63   
64   default
65        echo "unknown option "$1" , exiting..."
66        exit
67   endsw
68endif
69
70
71#define architecture files
72if ( $has_arch_opt == TRUE) then
73  if ( -e arch/arch-${arch}.fcm ) then
74    rm -f arch.fcm
75    ln -s arch/arch-${arch}.fcm arch.fcm
76  else
77    echo "architecture file : << arch/arch-${arch}.fcm >> is missing, exiting...."
78    exit
79  endif
80 
81  if ( -e arch/arch-${arch}.path ) then
82    rm -f arch.path
83    ln -s arch/arch-${arch}.path arch.path
84  else
85    echo "architecture file : << arch/arch-${arch}.path >> is missing, exiting...."
86    exit
87  endif
88else
89  echo "Warning : architecture not specified, taking default file <<arch.fcm>> and <<arch.path>>" 
90  if ( ! -e arch.fcm ) then
91    echo "architecture file : << arch.fcm >> is missing, exiting...."
92    exit
93  endif
94
95  if ( ! -e arch.fcm ) then
96    echo "architecture file : << arch.path >> is missing, exiting...."
97    exit
98  endif
99endif
100 
101# set compiler flags
102set FFLAGS="%BASE_FFLAGS"
103set LD_FFLAGS="%BASE_LD %MPI_LD"
104set CPP_KEY="%FPP_DEF"
105set INCDIR=""
106set LIB=""
107
108source ./arch.path
109
110# set compiler flags for optimisation
111if ( $has_compile_opt == FALSE ) then
112  set compile_flags=$default_compile_flags
113endif
114set FFLAGS=${FFLAGS}" %MPI_FFLAGS "$compile_flags
115
116
117# add path for xmlf90 library
118
119set INCDIR="$INCDIR $XMLF90_INCDIR"
120set LIB="$LIB $XMLF90_LIBDIR $XMLF90_LIB"
121
122# add path for ioipsl library
123set INCDIR="$INCDIR $IOIPSL_INCDIR"
124set LIB="$LIB $IOIPSL_LIBDIR $IOIPSL_LIB"
125
126if ( $has_oasis == TRUE ) then
127  set INCDIR="$INCDIR $OASIS_INCDIR"
128  set LIB="$LIB $OASIS_LIBDIR $OASIS_LIB"
129  set CPP_KEY="$CPP_KEY USE_OASIS"
130endif
131
132# add path for netcdf library
133set INCDIR="$INCDIR $NETCDF_INCDIR"
134set LIB="$LIB $NETCDF_LIBDIR $NETCDF_LIB"
135
136if ( $has_use_vt == TRUE ) then
137  set INCDIR="$INCDIR $VAMPIR_INCDIR"
138  set LIB="$LIB $VAMPIR_LIBDIR $VAMPIR_LIB"
139  set CPP_KEY="$CPP_KEY USE_VT"
140endif
141
142if ( $has_no_mpi == TRUE ) then
143  set CPP_KEY="NO_MPI $CPP_KEY"
144endif
145
146
147# build config file
148set config_fcm="config.fcm"
149rm -f $config_fcm
150
151echo "%FFLAGS        $FFLAGS"                           >  $config_fcm 
152echo "%CPP_KEY       $CPP_KEY"                          >> $config_fcm
153echo "%LD_FFLAGS     $LD_FFLAGS"                        >> $config_fcm
154echo "%INCDIR        $INCDIR"                           >> $config_fcm
155echo "%LIB           $LIB"                              >> $config_fcm
Note: See TracBrowser for help on using the repository browser.