impi-devel 2021.14.0__py2.py3-none-manylinux_2_28_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of impi-devel might be problematic. Click here for more details.

@@ -0,0 +1,731 @@
1
+ #!/bin/sh
2
+ #
3
+ # Copyright Intel Corporation.
4
+ #
5
+ # This software and the related documents are Intel copyrighted materials, and
6
+ # your use of them is governed by the express license under which they were
7
+ # provided to you (License). Unless the License provides otherwise, you may
8
+ # not use, modify, copy, publish, distribute, disclose or transmit this
9
+ # software or the related documents without Intel's prior written permission.
10
+ #
11
+ # This software and the related documents are provided as is, with no express
12
+ # or implied warranties, other than those that are expressly stated in the
13
+ # License.
14
+ #.
15
+ # (C) 2006 by Argonne National Laboratory.
16
+ #
17
+ # COPYRIGHT
18
+ #
19
+ # The following is a notice of limited availability of the code, and disclaimer
20
+ # which must be included in the prologue of the code and in all source listings
21
+ # of the code.
22
+ #
23
+ # Copyright Notice
24
+ # 1998--2020, Argonne National Laboratory
25
+ #
26
+ # Permission is hereby granted to use, reproduce, prepare derivative works, and
27
+ # to redistribute to others. This software was authored by:
28
+ #
29
+ # Mathematics and Computer Science Division
30
+ # Argonne National Laboratory, Argonne IL 60439
31
+ #
32
+ # (and)
33
+ #
34
+ # Department of Computer Science
35
+ # University of Illinois at Urbana-Champaign
36
+ #
37
+ #
38
+ # GOVERNMENT LICENSE
39
+ #
40
+ # Portions of this material resulted from work developed under a U.S.
41
+ # Government Contract and are subject to the following license: the Government
42
+ # is granted for itself and others acting on its behalf a paid-up, nonexclusive,
43
+ # irrevocable worldwide license in this computer software to reproduce, prepare
44
+ # derivative works, and perform publicly and display publicly.
45
+ #
46
+ # DISCLAIMER
47
+ #
48
+ # This computer code material was prepared, in part, as an account of work
49
+ # sponsored by an agency of the United States Government. Neither the United
50
+ # States, nor the University of Chicago, nor any of their employees, makes any
51
+ # warranty express or implied, or assumes any legal liability or responsibility
52
+ # for the accuracy, completeness, or usefulness of any information, apparatus,
53
+ # product, or process disclosed, or represents that its use would not infringe
54
+ # privately owned rights.
55
+ #
56
+ # EXTERNAL CONTRIBUTIONS
57
+ #
58
+ # Portions of this code have been contributed under the above license by:
59
+ #
60
+ # * Intel Corporation
61
+ # * Cray
62
+ # * IBM Corporation
63
+ # * Microsoft Corporation
64
+ # * Mellanox Technologies Ltd.
65
+ # * DataDirect Networks.
66
+ # * Oak Ridge National Laboratory
67
+ # * Sun Microsystems, Lustre group
68
+ # * Dolphin Interconnect Solutions Inc.
69
+ # * Institut Polytechnique de Bordeaux
70
+ #
71
+ # .
72
+ #
73
+ # mpif90
74
+ # Simple script to compile and/or link MPI programs.
75
+ # This script knows the default flags and libraries, and can handle
76
+ # alternative C compilers and the associated flags and libraries.
77
+ # The important terms are:
78
+ # includedir, libdir - Directories containing an *installed* mpich2
79
+ # prefix, execprefix - Often used to define includedir and libdir
80
+ # FC - Fortran 90 compiler
81
+ # WRAPPER_FCFLAGS - Any special flags needed to compile
82
+ # WRAPPER_LDFLAGS - Any special flags needed to link
83
+ # MPILIBNAME - Name of the MPI library
84
+ # MPI_OTHERLIBS - Other libraries needed in order to link
85
+ # FC_OTHER_LIBS - Yet more libraries, needed just with F90
86
+ #
87
+ # We assume that (a) the C compiler can both compile and link programs
88
+ #
89
+ # Handling of command-line options:
90
+ # This is a little tricky because some options may contain blanks.
91
+ #
92
+ # Special issues with shared libraries - todo
93
+ #
94
+ # --------------------------------------------------------------------------
95
+
96
+ # Set the default values of all variables.
97
+ #
98
+ # Directory locations: Fixed for any MPI implementation.
99
+ # Set from the directory arguments to configure (e.g., --prefix=/usr/local)
100
+ prefix=I_MPI_SUBSTITUTE_INSTALLDIR
101
+ # The environment variable I_MPI_ROOT may be used to override installation folder path
102
+ if [ -n "${I_MPI_ROOT}" ] ; then
103
+ prefix="${I_MPI_ROOT}";
104
+ fi
105
+
106
+ sysconfdir=${prefix}/etc
107
+ includedir=${prefix}/include
108
+ libdir=${prefix}/lib
109
+ if [ ! -f "${I_MPI_ROOT}/lib/mpi/debug/libmpi.so" ]; then
110
+ release_lib_dir="/release"
111
+ debug_lib_dir="/debug"
112
+ modincdir="${prefix}/include"
113
+ else
114
+ release_lib_dir=""
115
+ debug_lib_dir="/mpi/debug"
116
+ sysconfdir=${prefix}/opt/mpi/etc
117
+ modincdir="${prefix}/include/mpi"
118
+ fi
119
+ MPILIBDIR=${release_lib_dir}
120
+
121
+ # The environment variable I_MPI_COMPILER_CONFIG_DIR may be used to override
122
+ # folder where *.conf files are place
123
+ if [ -n "$I_MPI_COMPILER_CONFIG_DIR" ] ; then
124
+ sysconfdir=$I_MPI_COMPILER_CONFIG_DIR;
125
+ fi
126
+ #
127
+ # Default settings for compiler, flags, and libraries
128
+ # Determined by a combination of environment variables and tests within
129
+ # configure (e.g., determining whehter -lsocket is needee)
130
+ FC="ifx"
131
+ FCCPP=""
132
+ #
133
+ # Fortran 90 Compiler characteristics
134
+ FCINC="-I"
135
+ # f90modinc specifies how to add a directory to the search path for modules.
136
+ # Some compilers (Intel ifc version 5) do not support this concept, and
137
+ # instead need
138
+ # a specific list of files that contain module names and directories.
139
+ # The FCMODINCSPEC is a more general approach that uses <dir> and <file>
140
+ # for the directory and file respectively.
141
+ FCMODINC="-I"
142
+ FCMODINCSPEC=""
143
+ FCEXT="f90"
144
+ #
145
+ FCFLAGS=""
146
+ LDFLAGS="-ldl"
147
+ MPILIBNAME="mpi"
148
+
149
+ # MPIVERSION is the version of the Intel(R) MPI Library for which mpiifort is intended
150
+ MPIVERSION="2021.14"
151
+ #
152
+ #
153
+ # Internal variables
154
+ # Show is set to echo to cause the compilation command to be echoed instead
155
+ # of executed.
156
+ Show=
157
+ static_mpi=no
158
+ strip_debug_info=
159
+ handle_executable=
160
+ executable=a.out
161
+ ilp64=no
162
+ no_ilp64=
163
+ no_rpath=no
164
+ #
165
+ # End of initialization of variables
166
+ #---------------------------------------------------------------------
167
+ # Environment Variables.
168
+ # The environment variables I_MPI_F90, MPICH_F90 may be used to override the
169
+ # default choices. I_MPI_F90 has higher priority than MPICH_F90.
170
+ # In addition, if there is a file $sysconfdir/mpif90-$FCname.conf,
171
+ # where FCname is the name of the compiler with all spaces replaced by hyphens
172
+ # (e.g., "f90 -64" becomes "f90--64", that file is sources, allowing other
173
+ # changes to the compilation environment. See the variables used by the
174
+ # script (defined above)
175
+
176
+ if [ -n "$I_MPI_F90" ] ; then
177
+ FC="$I_MPI_F90"
178
+ FCname=$(echo $FC | sed 's/ /-/g')
179
+ if [ -s $sysconfdir/mpif90-$(basename $FCname).conf ] ; then
180
+ . $sysconfdir/mpif90-$(basename $FCname).conf
181
+ fi
182
+ else
183
+ if [ -n "$MPICH_F90" ] ; then
184
+ FC="$MPICH_F90"
185
+ FCname=$(echo $FC | sed 's/ /-/g')
186
+ if [ -s $sysconfdir/mpif90-$(basename $FCname).conf ] ; then
187
+ . $sysconfdir/mpif90-$(basename $FCname).conf
188
+ fi
189
+ fi
190
+ fi
191
+ if [ -n "$I_MPI_DEBUG_INFO_STRIP" ] ; then
192
+ for comp_val in "0" "off" "no" "disable"
193
+ do
194
+ if [ "$I_MPI_DEBUG_INFO_STRIP" = "$comp_val" ] ; then
195
+ strip_debug_info=no
196
+ break
197
+ fi
198
+ done
199
+ fi
200
+ # Allow a profiling option to be selected through an environment variable
201
+ if [ -n "$MPIF90_PROFILE" ] ; then
202
+ profConf=$MPIF90_PROFILE
203
+ fi
204
+ if [ -n "$I_MPI_F90_PROFILE" ] ; then
205
+ profConf=$I_MPI_F90_PROFILE
206
+ fi
207
+ if [ -n "$MPIFC_PROFILE" ] ; then
208
+ profConf=$MPIFC_PROFILE
209
+ fi
210
+ if [ -n "$I_MPI_FC_PROFILE" ] ; then
211
+ profConf=$I_MPI_FC_PROFILE
212
+ fi
213
+
214
+ # Override default mpi library
215
+ if [ -n "$I_MPI_LINK" ] ; then
216
+ mpilib_override=$I_MPI_LINK
217
+ fi
218
+
219
+ #
220
+ # ------------------------------------------------------------------------
221
+ # Argument processing.
222
+ # This is somewhat awkward because of the handling of arguments within
223
+ # the shell. We want to handle arguments that include spaces without
224
+ # loosing the spacing (an alternative would be to use a more powerful
225
+ # scripting language that would allow us to retain the array of values,
226
+ # which the basic (rather than enhanced) Bourne shell does not.
227
+ #
228
+ # Look through the arguments for arguments that indicate compile only.
229
+ # If these are *not* found, add the library options
230
+
231
+ linking=yes
232
+ allargs=""
233
+ cppflags=""
234
+ prevarg=""
235
+ for arg in "$@" ; do
236
+ # Set addarg to no if this arg should be ignored by the C compiler
237
+ addarg=yes
238
+ qarg=$arg
239
+ if [ "x$handle_executable" = "xyes" ] ; then
240
+ executable=$arg
241
+ handle_executable=
242
+ fi
243
+ case "$arg" in
244
+ # ----------------------------------------------------------------
245
+ # Compiler options that affect whether we are linking or no
246
+ -c|-S|-E|-M|-MM)
247
+ # The compiler links by default
248
+ linking=no
249
+ ;;
250
+ -o )
251
+ handle_executable=yes
252
+ addarg=yes
253
+ ;;
254
+ # ----------------------------------------------------------------
255
+ # Options that control how we use mpif90 (e.g., -show,
256
+ # -f90=* -config=*
257
+ -echo)
258
+ addarg=no
259
+ set -x
260
+ ;;
261
+ -f90=*)
262
+ FC=$(echo A$arg | sed -e 's/A-f90=//g')
263
+ if [ "$#" -eq "1" ] ; then
264
+ echo "Error: extra arguments required"
265
+ echo "usage: $(basename $0) -f90=<name> -v"
266
+ exit 1
267
+ fi
268
+ addarg=no
269
+ ;;
270
+ -show)
271
+ addarg=no
272
+ Show=echo
273
+ ;;
274
+ -show_env)
275
+ show_env=yes
276
+ ;;
277
+ -config=*)
278
+ addarg=no
279
+ FCname=$(echo A$arg | sed -e 's/A-config=//g')
280
+ if [ -s "$sysconfdir/mpif90-$FCname.conf" ] ; then
281
+ . "$sysconfdir/mpif90-$FCname.conf"
282
+ else
283
+ echo "Configuration file mpif90-$FCname.conf not found"
284
+ fi
285
+ ;;
286
+ -compile-info|-compile_info)
287
+ # -compile_info included for backward compatibility
288
+ Show=echo
289
+ addarg=no
290
+ ;;
291
+ -link-info|-link_info)
292
+ # -link_info included for backward compatibility
293
+ Show=echo
294
+ addarg=no
295
+ ;;
296
+ -v)
297
+ # Pass this argument to the compiler as well.
298
+ echo "$(basename $0) for the Intel(R) MPI Library $MPIVERSION for Linux*"
299
+ echo "Copyright Intel Corporation."
300
+ linking=no
301
+ ;;
302
+ -V)
303
+ # Pass this argument to the compiler to query the compiler version.
304
+ linking=no
305
+ ;;
306
+ -profile=*)
307
+ # Pass the name of a profiling configuration. As
308
+ # a special case, lib<name>.so or lib<name>.la may be used
309
+ # if the library is in $libdir
310
+ profConf=$(echo A$arg | sed -e 's/A-profile=//g')
311
+ addarg=no
312
+ # Loading the profConf file is handled below
313
+ ;;
314
+ -help)
315
+ # Print mini-help if started without parameters
316
+ echo "Simple script to compile and/or link MPI programs."
317
+ echo "Usage: $(basename $0) [options] <files>"
318
+ echo "----------------------------------------------------------------------------"
319
+ echo "The following options are supported:"
320
+ echo " -fc=<name> | -f90=<name>"
321
+ echo " specify a FORTRAN compiler name: i.e. -fc=ifort"
322
+ echo " -echo print the scripts during their execution"
323
+ echo " -show show command lines without real calling"
324
+ echo " -show_env show environment variables"
325
+ echo " -config=<name> specify a configuration file: i.e. -config=ifort for mpif90-ifort.conf file"
326
+ echo " -v print version info of $(basename $0) and its native compiler"
327
+ echo " -profile=<name> specify a profile configuration file (an MPI profiling"
328
+ echo " library): i.e. -profile=myprofile for the myprofile.cfg file."
329
+ echo " As a special case, lib<name>.so or lib<name>.a may be used"
330
+ echo " if the library is found"
331
+ echo " -check_mpi link against the Intel(R) Trace Collector (-profile=vtmc)."
332
+ echo " -static_mpi link the Intel(R) MPI Library statically"
333
+ echo " -mt_mpi link the thread safe version of the Intel(R) MPI Library"
334
+ echo " -ilp64 link the ILP64 support of the Intel(R) MPI Library"
335
+ echo " -no_ilp64 disable ILP64 support explicitly"
336
+ echo " -fast the same as -static_mpi + pass -fast option to a compiler."
337
+ echo " -t or -trace"
338
+ echo " link against the Intel(R) Trace Collector"
339
+ echo " -trace-imbalance"
340
+ echo " link against the Intel(R) Trace Collector imbalance library"
341
+ echo " (-profile=vtim)"
342
+ echo " -dynamic_log link against the Intel(R) Trace Collector dynamically"
343
+ echo " -static use static linkage method"
344
+ echo " -nostrip turn off the debug information stripping during static linking"
345
+ echo " -O enable optimization"
346
+ echo " -link_mpi=<name>"
347
+ echo " link against the specified version of the Intel(R) MPI Library"
348
+ echo " i.e -link_mpi=opt|opt_mt|dbg|dbg_mt"
349
+ echo " -norpath disable rpath for compiler wrapper of the Intel(R) MPI Library"
350
+ echo "All other options will be passed to the compiler without changing."
351
+ echo "----------------------------------------------------------------------------"
352
+ echo "The following environment variables are used:"
353
+ echo " I_MPI_ROOT the Intel(R) MPI Library installation directory path"
354
+ echo " I_MPI_F90 or MPICH_F90"
355
+ echo " the path/name of the underlying compiler to be used"
356
+ echo " I_MPI_FC_PROFILE or I_MPI_F90_PROFILE or MPIF90_PROFILE"
357
+ echo " the name of profile file (without extension)"
358
+ echo " I_MPI_COMPILER_CONFIG_DIR"
359
+ echo " the folder which contains configuration files *.conf"
360
+ echo " I_MPI_TRACE_PROFILE"
361
+ echo " specify a default profile for the -trace option"
362
+ echo " I_MPI_CHECK_PROFILE"
363
+ echo " specify a default profile for the -check_mpi option"
364
+ echo " I_MPI_LINK specify the version of the Intel(R) MPI Library"
365
+ echo " I_MPI_DEBUG_INFO_STRIP"
366
+ echo " turn on/off the debug information stripping during static linking"
367
+ echo "----------------------------------------------------------------------------"
368
+ exit 0
369
+ ;;
370
+ -nolinkage)
371
+ # This internal option is used by wrapper driver scripts mpicc, mpicxx, mpifc when -v option is used.
372
+ linking=no
373
+ addarg=no
374
+ ;;
375
+ -g)
376
+ MPILIBDIR=${release_lib_dir}
377
+ ;;
378
+ -static_mpi)
379
+ static_mpi=yes
380
+ FCFLAGS="$FCFLAGS -Xlinker --export-dynamic"
381
+ addarg=no
382
+ ;;
383
+ -static)
384
+ static_mpi=yes
385
+ FCFLAGS="$FCFLAGS -Xlinker --export-dynamic"
386
+ addarg=yes
387
+ ;;
388
+ -mt_mpi)
389
+ addarg=no
390
+ ;;
391
+ -ilp64)
392
+ ilp64=yes
393
+ addarg=no
394
+ ;;
395
+ -i8)
396
+ if [ -z "$no_ilp64" ] ; then
397
+ ilp64=yes
398
+ fi
399
+ addarg=yes
400
+ ;;
401
+ -integer-size)
402
+ addarg=yes
403
+ ;;
404
+ 32|64)
405
+ if [ "$prevarg" = "-integer-size" ]; then
406
+ if [ $arg -eq 64 ]; then
407
+ if [ -z "$no_ilp64" ] ; then
408
+ ilp64=yes
409
+ fi
410
+ fi
411
+ fi
412
+ addarg=yes
413
+ ;;
414
+ -no_ilp64)
415
+ no_ilp64=yes
416
+ ilp64=no
417
+ addarg=no
418
+ ;;
419
+ -check_mpi)
420
+ if [ -z "$profConf" ]; then
421
+ if [ -z "$I_MPI_CHECK_PROFILE" ]; then
422
+ profConf="vtmc"
423
+ else
424
+ profConf="$I_MPI_CHECK_PROFILE"
425
+ fi
426
+ else
427
+ echo "Warning: the -check_mpi option will be ignored because the profile was set."
428
+ fi
429
+ addarg=no
430
+ ;;
431
+ -trace-imbalance)
432
+ if [ -z "$profConf" ]; then
433
+ profConf="vtim"
434
+ else
435
+ echo "Warning: the -trace-imbalance option will be ignored because the profile was set."
436
+ fi
437
+ addarg=no
438
+ ;;
439
+ -t | -trace | -t=* | -trace=* )
440
+ if [ -z "$profConf" ]; then
441
+ if [ -z "$I_MPI_TRACE_PROFILE" ]; then
442
+ profConf="vt"
443
+ else
444
+ profConf="$I_MPI_TRACE_PROFILE"
445
+ fi
446
+ else
447
+ echo "Warning: the -trace option will be ignored because the profile was set."
448
+ fi
449
+ # Disable strip to prevent debug symbols into separate dbg file in case of static linking IMPI-1493
450
+ strip_debug_info=no
451
+ addarg=no
452
+ ;;
453
+ -fast)
454
+ echo "Warning: the -fast option forces static linkage method for the Intel(R) MPI Library."
455
+ static_mpi=yes
456
+ FCFLAGS="$FCFLAGS -Xlinker --export-dynamic"
457
+ ;;
458
+ -fc=*)
459
+ FC=$(echo A$arg | sed -e 's/A-fc=//g')
460
+ if [ "$#" -eq "1" ] ; then
461
+ echo "Error: extra arguments required"
462
+ echo "usage: $(basename $0) -fc=<name> -v"
463
+ exit 1
464
+ fi
465
+ addarg=no
466
+ ;;
467
+ -link_mpi=* )
468
+ mpilib_override=$(echo A$arg | sed -e 's/A-link_mpi=//g')
469
+ addarg=no
470
+ ;;
471
+ -nostrip )
472
+ strip_debug_info=no
473
+ addarg=no
474
+ ;;
475
+ -norpath )
476
+ no_rpath=yes
477
+ addarg=no
478
+ ;;
479
+ # Other arguments. We are careful to handle arguments with
480
+ # quotes (we try to quote all arguments in case they include
481
+ # any spaces)
482
+ *\"*)
483
+ qarg="'$arg'"
484
+ case $arg in
485
+ -D*)
486
+ cppflags="$cppflags $qarg"
487
+ ;;
488
+ -I*)
489
+ cppflags="$cppflags $qarg"
490
+ ;;
491
+ esac
492
+ ;;
493
+ *\'*)
494
+ qarg=$(echo \"$arg\")
495
+ case $arg in
496
+ -D*)
497
+ cppflags="$cppflags $qarg"
498
+ ;;
499
+ -I*)
500
+ cppflags="$cppflags $qarg"
501
+ ;;
502
+ esac
503
+ ;;
504
+ -D*)
505
+ qarg="'$arg'"
506
+ cppflags="$cppflags $qarg"
507
+ ;;
508
+ -I*)
509
+ qarg="'$arg'"
510
+ cppflags="$cppflags $qarg"
511
+ ;;
512
+ # The following are special args used to handle .F files when the
513
+ # Fortran compiler itself does not handle these options
514
+ *.F|*.F90|.fpp|.FPP)
515
+ # If FCCPP is not empty, then we need to do the following:
516
+ # If any input files have the .F or .F90 extension, then
517
+ # If FCCPP = false, then
518
+ # generate an error message and exit
519
+ # Use FCCPP to convert the file from .F to .f, using
520
+ # $TMPDIR/f$$-$count.f as the output file name
521
+ # Replace the input file with this name in the args
522
+ # This is needed only for very broken systems
523
+
524
+ if [ -n "$FCCPP" ] ; then
525
+ if [ "$FCCPP" = "false" ] ; then
526
+ echo "This Fortran compiler does not accept .F or .F90 files"
527
+ exit 1
528
+ fi
529
+ addarg=no
530
+ # Remove and directory names and extension
531
+ ext=$(expr "$arg" : '.*\(\..*\)')
532
+ bfile=$(basename $arg $ext)
533
+ #
534
+ TMPDIR=${TMPDIR:-/tmp}
535
+ # Make sure that we use a valid extension for the temp file.
536
+ tmpfile=$TMPDIR/f$$-$bfile.$FCEXT
537
+ if $FCCPP $cppflags $arg > $tmpfile ; then
538
+ # Add this file to the commandline list
539
+ count=$((count + 1))
540
+ allargs[${#allargs}]="$tmpfile"
541
+ rmfiles="$rmfiles $tmpfile"
542
+ else
543
+ echo "Aborting compilation because of failure in preprocessing step"
544
+ echo "for file $arg ."
545
+ exit 1
546
+ fi
547
+ fi
548
+ # Otherwise, just accept the argument
549
+ ;;
550
+ *)
551
+ qarg="'$arg'"
552
+ ;;
553
+ # - end of special handling for .F files
554
+
555
+ esac
556
+ if [ $addarg = yes ] ; then
557
+ allargs="$allargs $qarg"
558
+ fi
559
+ prevarg="$arg"
560
+ done
561
+
562
+ if [ $# -eq 0 ] ; then
563
+ echo "Error: Command line argument is needed!"
564
+ "$0" -help
565
+ exit 1
566
+ fi
567
+
568
+ if [ -n "$mpilib_override" ] ; then
569
+ case "$mpilib_override" in
570
+ opt )
571
+ MPILIBDIR=${release_lib_dir}
572
+ ;;
573
+ opt_mt )
574
+ MPILIBDIR=${release_lib_dir}
575
+ ;;
576
+ dbg )
577
+ MPILIBDIR=${debug_lib_dir}
578
+ ;;
579
+ dbg_mt )
580
+ MPILIBDIR=${debug_lib_dir}
581
+ ;;
582
+ * )
583
+ echo "Warning: incorrect library version specified. Automatically selected library will be used."
584
+ ;;
585
+ esac
586
+ fi
587
+ # -----------------------------------------------------------------------
588
+
589
+ if [ "$static_mpi" = yes ] ; then
590
+ mpilibs="${libdir}/libmpifort.a ${libdir}${MPILIBDIR}/lib${MPILIBNAME}.a"
591
+ I_MPI_OTHERLIBS=""
592
+ MPI_OTHERLIBS=" -lrt -lpthread "
593
+ if [ "$ilp64" = yes ]; then
594
+ mpilibs="${libdir}${MPILIBDIR}/libmpi_ilp64.a $mpilibs"
595
+ fi
596
+ if [ "x$strip_debug_info" = "x" ] ; then
597
+ strip_debug_info=yes
598
+ fi
599
+ else
600
+ mpilibs="-lmpifort -l$MPILIBNAME"
601
+ I_MPI_OTHERLIBS=""
602
+ MPI_OTHERLIBS=" -lrt -lpthread "
603
+ if [ "$ilp64" = yes ]; then
604
+ mpilibs="-lmpi_ilp64 $mpilibs"
605
+ fi
606
+ fi
607
+ # Derived variables. These are assembled from variables set from the
608
+ # default, environment, configuration file (if any) and command-line
609
+ # options (if any)
610
+
611
+ #
612
+ # The library lib${MPILIBNAME}f90 contains the f90-specific features,
613
+ # such as the module objects and the routines defined by them
614
+ # (MPI_SIZEOF is handled in lib${MPILIBNAME)f90, for example).
615
+
616
+ #
617
+ # Handle the case of a profile switch
618
+ if [ -n "$profConf" ] ; then
619
+ profConffile=
620
+ if [ -s "$libdir/lib$profConf.a" -o -s "$libdir/lib$profConf.so" ] ; then
621
+ mpilibs="-l$profConf $mpilibs"
622
+ elif [ -s "$sysconfdir/$profConf.conf" ] ; then
623
+ profConffile="$sysconfdir/$profConf.conf"
624
+ elif [ -s "$profConf.conf" ] ; then
625
+ profConffile="$profConf.conf"
626
+ else
627
+ echo "Profiling configuration file $profConf.conf not found in $sysconfdir"
628
+ fi
629
+ if [ -n "$profConffile" -a -s "$profConffile" ] ; then
630
+ . $profConffile
631
+ if [ -n "$PROFILE_INCPATHS" ] ; then
632
+ FCFLAGS="$PROFILE_INCPATHS $FCFLAGS"
633
+ fi
634
+ if [ -n "$PROFILE_PRELIB" ] ; then
635
+ mpilibs="$PROFILE_PRELIB $mpilibs"
636
+ fi
637
+ if [ -n "$PROFILE_POSTLIB" ] ; then
638
+ mpilibs="$mpilibs $PROFILE_POSTLIB"
639
+ fi
640
+ fi
641
+ fi
642
+
643
+ # Construct the line to add the include directory (not all compilers
644
+ # use -I, unfortunately)
645
+ if [ -z "${FCINC}" ] ; then
646
+ # If there is no path, add a link to the mpif.h file.
647
+ # There *must* be a way to provide the path the any modules (there
648
+ # may be too many to link)
649
+ if [ ! -r mpif.h ] ; then
650
+ trap "$Show rm -f mpif.h" 0
651
+ # This should really be the (related) f77includedir (see mpif77).
652
+ $Show ln -s ${includedir}/mpif.h mpif.h
653
+ # Remember to remove this file
654
+ rmfiles="$rmfiles mpif.h"
655
+ fi
656
+ FCINCDIRS=
657
+ else
658
+ # Normally, FCINC is just -I, but some compilers have used different
659
+ # command line arguments
660
+ FCINCDIRS="${FCINC}\"${includedir}\" ${FCINC}\"${modincdir}\""
661
+ fi
662
+
663
+ # Handle the specification of the directory containing the modules
664
+ # For now, these are in the includedir (no choice argument supported)
665
+ if [ "$ilp64" = yes ] ; then
666
+ moduledir="$modincdir/ilp64"
667
+ else
668
+ moduledir="$modincdir"
669
+ fi
670
+ modulelib=${MPILIBNAME}f90
671
+ if [ -n "$FCMODINCSPEC" ] ; then
672
+ newarg=`echo A"$FCMODINCSPEC" | \
673
+ sed -e 's/^A//' -e 's%<dir>%'"$moduledir%g" -e 's/<file>/mpi/g'`
674
+ FCMODDIRS="$newarg"
675
+ FCMODLIBS="-l$modulelib"
676
+ elif [ -n "$FCMODINC" ] ; then
677
+ FCMODDIRS="${FCMODINC}\"${moduledir}\""
678
+ FCMODLIBS="-l$modulelib"
679
+ fi
680
+
681
+ #
682
+ # A temporary statement to invoke the compiler
683
+ # Place the -L before any args incase there are any mpi libraries in there.
684
+ # Eventually, we'll want to move this after any non-MPI implementation
685
+ # libraries
686
+
687
+ if [ "${show_env}" = "yes" ]; then
688
+ env | more
689
+ exit 0
690
+ fi
691
+
692
+ if [ "$no_rpath" = "yes" ]; then
693
+ rpath_opt="-Xlinker --enable-new-dtags"
694
+ else
695
+ rpath_opt="-Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker \"${libdir}${MPILIBDIR}\" -Xlinker -rpath -Xlinker \"${libdir}\""
696
+ fi
697
+ if [ "$linking" = yes ] ; then
698
+ cmd_line="$FC $FCFLAGS $allargs $FCMODDIRS $FCINCDIRS -L\"${libdir}${MPILIBDIR}\" -L\"${libdir}\" $rpath_opt $mpilibs $I_MPI_OTHERLIBS $LDFLAGS $MPI_OTHERLIBS"
699
+ if [ "$Show" = echo ] ; then
700
+ echo $cmd_line
701
+ else
702
+ eval `echo $cmd_line`
703
+ fi
704
+ rc=$?
705
+ if [ $rc -eq 0 -a "x$strip_debug_info" = "xyes" ] ; then
706
+ $Show objcopy --only-keep-debug ${executable} ${executable}.dbg
707
+ $Show objcopy --strip-debug ${executable}
708
+ $Show objcopy --add-gnu-debuglink=${executable}.dbg ${executable}
709
+ fi
710
+ else
711
+ cmd_line="$FC $FCFLAGS $allargs $FCMODDIRS $FCINCDIRS"
712
+ if [ "$Show" = echo ] ; then
713
+ echo $cmd_line
714
+ else
715
+ eval `echo $cmd_line`
716
+ fi
717
+ rc=$?
718
+ fi
719
+ if [ -n "$rmfiles" ] ; then
720
+ for file in $rmfiles ; do
721
+ objfile=`basename $file .f`
722
+ if [ -s "${objfile}.o" ] ; then
723
+ # Rename
724
+ destfile=`echo $objfile | sed -e "s/.*$$-//"`
725
+ mv -f ${objfile}.o ${destfile}.o
726
+ fi
727
+ rm -f $file
728
+ done
729
+ rm -f $rmfiles
730
+ fi
731
+ exit $rc