The -fpen (Linux* and Mac OS*) or /fpe:n (Windows*) option allows some control over the results of floating-point exceptions.
Hi, I am trying to compile some code I wrote for my research on an Intel Mac Pro running Mac OS X Tiger 10.4.11 using ifort. As I managed to this before on Fedora 8 with ifort, as well as on this Mac Pro using gfortran 4.3, I expected no problems. 'I am using Intel Fortran Compiler to develop an automated forest cover identification system from digital aerial images forming stereo pairs. This system uses advanced texture and shape analysis to identify and classify the forest cover (species, density, and height) in order to produce forest inventory maps.
-fpe0 or /fpe:0 restricts floating-point exceptions by enabling the overflow, the divide-by-zero, and the invalid floating-point exceptions. The program will print an error message and abort if any of these exceptions occurs. If a floating underflow occurs, the result is set to zero and execution continues. This is called flush-to-zero. This option sets -IPF_fp_speculationstrict (Linux and Mac OS) or /QIPF_fp_speculationstrict (Windows) if no specific -IPF_fp_speculation or /QIPF_fp_speculation option is specified. The -fpe0 or /fpe:0 option sets -ftz (Linux and Mac OS) /Qftz (Windows). To get more detailed location information about where the exception occurred, use -traceback (Linux and Mac OS) or /traceback (Windows).
- The ifort command automatically references the appropriate Intel Fortran Run-Time Libraries when it invokes the linker. Therefore, to link one or more object files created by the Intel Fortran compiler, you should use the ifort command instead of the link command.
- The Intel Fortran Compiler or simply IFORT is a family of extremely powerful Fortran compiler for Intel hardware. It comes with many lucrative feature sets that make program optimization very easy. Most of these Fortran compilers can pre-process, compile, assemble, and link Fortran applications very effectively on both IA-32 and Intel 64 systems.
- I have a program that need to be installed with the 'gfortran/ifort' compiler. I have a Mac OSX 10.6.8 (Snow Leopard). I know I have gcc installed, because I installed my self (from the gcc package inside the Xcode installer, so I did not have to install the whole xcode), also after typing in the terminal 'which gcc' I get the directory.
Note
On systems based on the IA-32 and Intel® 64 architectures , explicitly setting -fpe0 or /fpe:0 can degrade performance since the generated code stream must be synchronized after each floating-point instruction to allow for abrupt underflow fix-up.
-fpe1 or /fpe:1 restricts only floating-point underflow. Floating-point overflow, floating-point divide-by-zero, and floating-point invalid produce exceptional values (NaN and signed Infinities) and execution continues. If a floating-point underflow occurs, the result is set to zero and execution continues. The /fpe:1 option sets -ftz or /Qftz.
Note
On systems based on the IA-32 and Intel® 64 architectures , explicitly setting -fpe1 or /fpe:1 can degrade performance since the generated code stream must be synchronized after each floating-point instruction to allow for abrupt underflow fix-up.
-fpe3 or /fpe:3 is the default on all processors, which allows full floating-point exception behavior. Floating-point overflow, floating-point divide-by-zero, and floating-point invalid produce exceptional values (NaN and signed Infinities) and execution continues. Floating underflow is gradual: denormalized values are produced until the result becomes 0.
The -fpe or /fpe option enables exceptions in the Fortran main program only. The floating-point exception behavior set by the Fortran main program remains in effect throughout the execution of the entire program unless changed by the programmer. If the main program is not Fortran, the user can use the Fortran intrinsic FOR_SET_FPE to set the floating-point exception behavior.
When compiling different routines in a program separately, you should use the same value of n in -fpen or /fpe:n.
An example follows:
IMPLICIT NONE
real*4 res_uflow, res_oflow
real*4 res_dbyz, res_inv
real*4 small, big, zero, scale
small = 1.0e-30
big = 1.0e30
zero = 0.0
scale = 1.0e-10
! IEEE underflow condition (Underflow Raised)
res_uflow = small * scale
write(6,100)'Underflow: ',small, ' *', scale, ' = ', res_uflow
! IEEE overflow condition (Overflow Raised)
res_oflow = big * big
write(6,100)'Overflow: ', big, ' *', big, ' = ', res_oflow
! IEEE divide-by-zero condition (Divide by Zero Raised)
res_dbyz = -big / zero
write(6,100)'Div-by-zero: ', -big, ' /', zero, ' = ', res_dbyz
! IEEE invalid condition (Invalid Raised)
res_inv = zero / zero
write(6,100)'Invalid: ', zero, ' /', zero, ' = ', res_inv
100 format(A14,E8.1,A2,E8.1,A2,E10.1)
end
Consider the following command line:
ifort fpe.f90 -fpe0 -fp-model strict -g (Linux and Mac OS)
ifort fpe.f90 /fpe:0 /fp:strict /traceback (Windows)
Output similar to the following should result:
Windows:
Underflow: 0.1E-29 * 0.1E-09 = 0.0E+00
forrtl: error (72): floating overflow
Image PC Routine Line Source
fpe.exe 0040115B Unknown Unknown Unknown
fpe.exe 0044DFC0 Unknown Unknown Unknown
fpe.exe 00433277 Unknown Unknown Unknown
Up to2%cash back How does Caster apply to a Jeep? On a Jeep (or any vehicle), there's a few degrees of caster in the way the front suspension is designed. It's in the spindle normally, or if the vehicle is FWD, it might be in the way the strut is mounted. Every vehicle is a little different. On a Jeep, it's where the ball joints line up on the end of the axle. Meaning, if you take the tire off and look head-on at the. How to measure caster in jeep jl. Jan 24, 2020 you can measure the two big holes next to the diff. Caster / yoke difference is 6 degrees. So 0 degree at diff is 6 caster. 2 degree at diff is 4 caster.
kernel32.dll 7C816D4F Unknown Unknown Unknown
Linux and Mac OS:
![Ifort Mac Ifort Mac](https://image1.slideserve.com/3279593/command-line-ftp-2-l.jpg)
./a.out
Underflow: 0.1E-29 * 0.1E-09 = 0.0E+00
forrtl: error (72): floating overflow
Image PC Routine Line Source
a.out 0804A063 Unknown Unknown Unknown
a.out 08049E78 Unknown Unknown Unknown
Unknown B746B748 Unknown Unknown Unknown
a.out 08049D31 Unknown Unknown Unknown
The following command line uses /fpe1:
ifort fpe.f90 -fpe1 -g (Linux and Mac OS)
ifort fpe.f90 /fpe:1 /traceback (Windows)
ifort fpe.f90 /fpe:1 /traceback (Windows)
The following output is produced:
Underflow: 0.1E-29 * 0.1E-09 = 0.0E+00
Overflow: 0.1E+31 * 0.1E+31 = Infinity
Div-by-zero: -0.1E+31 / 0.0E+00 = -Infinity
Invalid: 0.0E+00 / 0.0E+00 = NaN
The following command line uses /fpe3:
ifort fpe.f90 -fpe3 -g (Linux and Mac OS)
ifort fpe.f90 /fpe:3 /traceback (Windows)
The following output is produced:
Underflow: 0.1E-29 * 0.1E-09 = 0.1E-39
Overflow: 0.1E+31 * 0.1E+31 = Infinity
Div-by-zero: -0.1E+31 / 0.0E+00 = -Infinity
Invalid: 0.0E+00 / 0.0E+00 = NaN
From: David Watson (dewatson_at_olemiss.edu)Date: Thu Jul 23 2009 - 15:03:59 CDT
- Previous message:Mengjuei Hsieh: 'Re: [AMBER] errors of PMEMD installation'
- Messages sorted by:[ date ][ thread ][ subject ][ author ]
System/software configuration:
MacBook, 2 GHz Intel Core 2 Duo
Xcode 3.1.3
Intel Fortran 11.1 (058)
MPICH2-1.1.1
MacBook, 2 GHz Intel Core 2 Duo
Xcode 3.1.3
Intel Fortran 11.1 (058)
MPICH2-1.1.1
Installing developer tools:
Uninstalled previous versions of Intel Software Development Products
Installed Xcode 3.1.3
Installed Intel Fortan Compiler 11.1 (058)
Installed Intel C++ Compiler 11.1 (058)
Uninstalled previous versions of Intel Software Development Products
Installed Xcode 3.1.3
Installed Intel Fortan Compiler 11.1 (058)
Installed Intel C++ Compiler 11.1 (058)
Edited ~/.bash_profile to include
# BEGIN bash configuration for AMBER10 compilation
. /opt/intel/Compiler/11.1/058/bin/ifortvars.sh ia32
. /opt/intel/Compiler/11.1/058/bin/iccvars.sh ia32
. /Library/Frameworks/Intel_MKL.framework/Versions/Current/tools/
environment/mklvars32.sh
MPI_HOME=/opt/mpich2
export MPI_HOME
MKL_HOME=/Library/Frameworks/Intel_MKL.framework/Versions
export MKL_HOME
# END bash configuration for AMBER10 compilation
# BEGIN bash configuration for AMBER10 compilation
. /opt/intel/Compiler/11.1/058/bin/ifortvars.sh ia32
. /opt/intel/Compiler/11.1/058/bin/iccvars.sh ia32
. /Library/Frameworks/Intel_MKL.framework/Versions/Current/tools/
environment/mklvars32.sh
MPI_HOME=/opt/mpich2
export MPI_HOME
MKL_HOME=/Library/Frameworks/Intel_MKL.framework/Versions
export MKL_HOME
# END bash configuration for AMBER10 compilation
Configured MPICH2 with the following script
# BEGIN file mpich2_for_mac.sh
export CC=icc
export CFLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export F77=ifort
export FFLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export F90=ifort
export F90FLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export CXX=icpc
export CXXFLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export LDFLAGS='-L/opt/intel/Compiler/11.1/058/lib'
# BEGIN file mpich2_for_mac.sh
export CC=icc
export CFLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export F77=ifort
export FFLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export F90=ifort
export F90FLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export CXX=icpc
export CXXFLAGS='-xHost -I/opt/intel/Compiler/11.1/058/lib'
export LDFLAGS='-L/opt/intel/Compiler/11.1/058/lib'
./configure --prefix=/opt/mpich2
# END file mpich2_for_mac.sh
# END file mpich2_for_mac.sh
Ran the mpich2 configure script, then executed 'make' and 'make
install' to install mpich2 executables and libraries in /opt/mpich2
install' to install mpich2 executables and libraries in /opt/mpich2
Configured parallel installation of amber10 with
./configure_amber -openmp -mpich2 -nosanderidc ifort_macosx
./configure_amber -openmp -mpich2 -nosanderidc ifort_macosx
Edited the config_amber.h file
added -xHost to both the FFLAGS and FOPTFLAGS
changed LOADLIB to:
LOADLIB= -L$(MKL_HOME)/lib/32 $(MKL_HOME)/lib/32/
libmkl_solver.a -lmkl_intel -lmkl_intel_thread -lmkl_core -lmkl_lapack
-openmp -lpthread
added -xHost to both the FFLAGS and FOPTFLAGS
changed LOADLIB to:
LOADLIB= -L$(MKL_HOME)/lib/32 $(MKL_HOME)/lib/32/
libmkl_solver.a -lmkl_intel -lmkl_intel_thread -lmkl_core -lmkl_lapack
-openmp -lpthread
Compiled amber parallel
Proceeded to configure pmemd with
./configure linux_p4 ifort mpich2 bintraj
and made the following changes to config.h
MATH_LIBS= -L$(MKL_HOME)/lib/32 $(MKL_HOME)/lib/32/
libmkl_solver.a -lmkl_intel -lmkl_intel_thread -lmkl_core -openmp -
lpthread
MPI_LIBS = -L$(MPI_LIBDIR) -lmpich -lpthread
CPP = /usr/bin/cpp
F90 = mpif90
F90_OPT_HI = -xHost -ip -O3
LOAD = mpif90
LOADLIBS = -limf -lsvml
./configure linux_p4 ifort mpich2 bintraj
and made the following changes to config.h
MATH_LIBS= -L$(MKL_HOME)/lib/32 $(MKL_HOME)/lib/32/
libmkl_solver.a -lmkl_intel -lmkl_intel_thread -lmkl_core -openmp -
lpthread
MPI_LIBS = -L$(MPI_LIBDIR) -lmpich -lpthread
CPP = /usr/bin/cpp
F90 = mpif90
F90_OPT_HI = -xHost -ip -O3
LOAD = mpif90
LOADLIBS = -limf -lsvml
Ifort Macport
Compiled pmemd parallel
Nearly all of the tests, except the noesy and evb/
poh_dbonds_umb_dg_UFF_9DG* tests ran and gave acceptable results.
poh_dbonds_umb_dg_UFF_9DG* tests ran and gave acceptable results.
Go ahead, bug me again about -xHost, somebody!
The Intel Fortran Compiler User and Reference Guide says that this
option 'Can generate instructions for the highest instruction set
available on the compilation host processor.' (Fortran 11, for Mac OS X)
Is this something that shouldn't be done?
As long as I'm running it on the same host that I compiled on, this
should be fine, right?
The Intel Fortran Compiler User and Reference Guide says that this
option 'Can generate instructions for the highest instruction set
available on the compilation host processor.' (Fortran 11, for Mac OS X)
Is this something that shouldn't be done?
As long as I'm running it on the same host that I compiled on, this
should be fine, right?
_______________________________________________
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Ifort Compiler Mac
- Previous message:Mengjuei Hsieh: 'Re: [AMBER] errors of PMEMD installation'
- Messages sorted by:[ date ][ thread ][ subject ][ author ]