Quantcast
Channel: Intel® Software - Intel® Fortran Compiler for Linux* and macOS*
Viewing all 2746 articles
Browse latest View live

Xcode & Fortran ComposerXE compatibility?

$
0
0

Under Mac OS X 10.11.1 (El Capitan) is it possible to run

Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.1.7.380 Build 20120928

with Xcode 7.2? If not, is there any (older) version of Xcode that will work?

(Processor: 3.1 GHz Intel Core i7)

Thank you!

 


Possible compiler bug?

$
0
0

I'm seeing some weird behavior on certain Linux systems for code that works fine on Windows (and also on other Linux systems). The example code is attached (reproducer.f90).  It has a class that contains a function pointer that is being associated to a subroutine that is contained within another subroutine.  My understanding is that this is valid?

My system is: HP DL360 G6, Intel(R) Xeon(R) X5570, CentOS 6.  I'm using Intel 16.0.1 20151021.

Compile with: ifort -g -traceback reproducer.f90 -o reproducer

Running it crashes (Not sure why I'm not getting the line numbers. What do I have to do to get those?):

$ ./reproducer
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
reproducer         0000000000477705  Unknown               Unknown  Unknown
reproducer         00000000004754C7  Unknown               Unknown  Unknown
reproducer         0000000000444DB4  Unknown               Unknown  Unknown
reproducer         0000000000444BC6  Unknown               Unknown  Unknown
reproducer         0000000000425CC6  Unknown               Unknown  Unknown
reproducer         00000000004032B0  Unknown               Unknown  Unknown
libpthread.so.0    0000003A0460F790  Unknown               Unknown  Unknown
Unknown            00007FFE9F1AD658  Unknown               Unknown  Unknown

However, running it in a debugger, it works fine:

$ gdb-ia ./reproducer

(gdb) run
Starting program: reproducer
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
   3.00000000000000
[Inferior 1 (process 14138) exited normally]
(gdb)

Also interesting is that if I use "set disable-randomization off" in the debugger, it crashes again:

$ gdb-ia ./reproducer

(gdb) set disable-randomization off
(gdb) run
Starting program: reproducer
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Catchpoint -2 (signal SIGSEGV), 0x00007fff187ab458 in ?? ()

(gdb) where
#0  0x00007fff187ab458 in ?? ()
#1  0x00000000004030d5 in my_module::my_test () at reproducer.f90:42
#2  0x0000000000403175 in test () at reproducer.f90:71
#3  0x0000000000402e1e in main ()
#4  0x0000003a03a1ed5d in __libc_start_main () from /lib64/libc.so.6
#5  0x0000000000402d29 in _start ()
(gdb)

Any ideas? I think the code is valid, so maybe it's a compiler bug? However, since it does work on another similar Linux systems, I'm wondering if it could be some system-specific setting, but I don't know what would cause such behavior. (I normally work with the Windows compiler, so maybe more Linux-savvy folks can point me in the right direction).

AttachmentSize
Downloadapplication/octet-streamreproducer.f901.26 KB

Not able to "compilervars"

$
0
0

Hi!

I just installed the 'Intel Parallel Studio XE (Cluster edition)' on my Ubuntu machine. Because I want to use the fortran compiler, I looked up its documetation and followed the instructions. One of the first is to set environment variables.I get the output that follows, when I run the following command:

$ ./compilervars.sh intel64
bash: ./compilervars.sh: 36: /opt/intel/compilers_and_libraries_2016.1.150/linux/daal/bin/daalvars.sh: Bad substitution
bash: ./compilervars.sh: 37: /opt/intel/compilers_and_libraries_2016.1.150/linux/daal/bin/daalvars.sh: Bad substitution

I don't quite understand what is wrong.

If I start a new terminal and type 'ifort', it does not recognize it. So the linking has not happened. I don't know what else is wrong.

Can someone help me out?

Thanks

Vishnu

Download Intel(R) FORTRAN Compiler Version 12.0.4 for Linux

$
0
0

Hello, I would like to download Intel(R) FORTRAN Compiler Version 12.0.4 for Linux to be installed on a cluster for parallel computing. I work as a researcher at SUPSI, an academic institution. Could you please let me know where I can download this compiler from? Even a free-trial version would be enough for now. Thanks a lot for any help you may provide. Best regards, Giancarlo

-march=generic unsupported

$
0
0

When I try to compile a source file with 15.0.2, and set the flag "-march=generic", I receive the warning "invalid argument for option '-m'".  The documentation (or more specifically, the manpage) for ifort specifies "generic" as an available option for the -march flag.  This appears to be an oversight in the documentation.

new linux system w/o libstdc++.so.5

$
0
0

Hello,

on my new Linux system (opensuse 13.2 64bit), there is no more library libstdc ++. so.5. There are only libstdc ++. So.6. However, my old fortran programs require a compiler version 11.1 or something like that.
Which is the oldest version of the fortran compiler, which already runs with libstdc ++. So.6 and where can I download it?

 

Herbert

Undefined symbols for architecture x86_64 error

$
0
0

Hi

I'am trying to compile abinit 7.10 or other versions of the code on mac 10.10.2 macbook air with ifort 16.0.1

the command which ifort give me:

/opt/intel//compilers_and_libraries_2016.1.111/mac/bin/intel64/ifort

i try to compile with 

./configure FC=ifort CC=icc CXX=icpc F77=ifort

 

but always i found with intel compiler this error

Undefined symbols for architecture x86_64:

  "_m_profiling_abi_mp_abi_alloc_stat_abi_", referenced from:

      _MAIN__ in abinit-abinit.o

      _chkinp_ in lib57_iovars.a(chkinp.o)

      _driver_ in lib95_drive.a(driver.o)

      _m_ab7_invars_mp_ab7_invars_set_flags_ in lib57_iovars.a(m_ab7_invars_f90.o)

      _m_ab7_invars_mp_new_token_ in lib57_iovars.a(m_ab7_invars_f90.o)

      _m_ab7_invars_mp_ab7_invars_load_ in lib57_iovars.a(m_ab7_invars_f90.o)

      _m_ab7_invars_mp_free_token_ in lib57_iovars.a(m_ab7_invars_f90.o)

      ...

  "_pseudo_pwscf_mp_betar_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_chi_", referenced from:

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_pswfc_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_dft_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_dion_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_ecutrho_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_ecutwfc_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_els_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_etotps_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_ikk2_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_isus_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_lchi_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_lll_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_lmax_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_mesh_", referenced from:

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_mesh_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_rhoatom_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_pswfc_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_local_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      ...

  "_pseudo_pwscf_mp_nbeta_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_nlcc_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_nqf_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_nqlc_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_ntwfc_", referenced from:

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_pswfc_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_oc_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_psd_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_pseudotype_", referenced from:

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_qfcoef_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_qfunc_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_qqq_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_r_", referenced from:

      _read_pseudo_mesh_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_rab_", referenced from:

      _read_pseudo_mesh_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_rho_at_", referenced from:

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_rhoatom_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_rho_atc_", referenced from:

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_nlcc_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_rinner_", referenced from:

      _read_pseudo_nl_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

  "_pseudo_pwscf_mp_vloc0_", referenced from:

      _read_pseudo_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _read_pseudo_local_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

  "_pseudo_pwscf_mp_zp_", referenced from:

      _upfheader2abi_ in lib57_iopsp_parser.a(upfheader2abi.o)

      _read_pseudo_header_ in lib11_qespresso_ext.a(read_upf_pwscf.o)

      _upf2abinit_ in lib65_psp.a(upf2abinit.o)

ld: symbol(s) not found for architecture x86_64

make[3]: *** [abinit] Error 1

make[2]: *** [all-recursive] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2

with gnu compiler i found no error

Please can you help me to solve this problem

thanks

eleonora

Symbolic Link to ifort

$
0
0

Hi!

I am attempting to use the Intel compiler on Ubuntu 14.04, using Geany as my editor. The following question is related to an earlier forum topic linked here. It talks about Geany not being able to use ifort. Even if the 'source-ing' command has been added to .bashrc, this problem persists. A solution given on an Ubuntu forum was to make a symbolic link to the 'ifort' file.

My question is, what file do I use to make this symbolic link? I can see lots of possiblilities:

/opt/intel/parallel_studio_xe_2016.1.056/compilers_and_libraries_2016/linux/bin/intel64/ifort

or

/opt/intel/compilers_and_libraries_2016.1.150/linux/bin/intel64/ifort

or

/opt/intel/compilers_and_libraries/linux/bin/intel64/ifort

I'm confused.


Why only half of the cores are used in OPENMP

$
0
0

I have 20 cores per node. I run codes on the machine  using OPENMP.

Why only half of the number of the cores(10) are used, while the others are sleeping?

It puzzles me a lot. 

error loading libiomp5.so

$
0
0

Hi

I get the following error when I try to compile with the '-parallel' flag:

error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory

As requested in some forum discussions, I checked:

LD_LIBRARY_PATH=/opt/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.1.150/linux/mpi/intel64/lib:/opt/intel/compilers_and_libraries_2016.1.150/linux/mpi/mic/lib:/opt/intel/compilers_and_libraries_2016.1.150/linux/ipp/lib/intel64:/opt/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64:/opt/intel/compilers_and_libraries_2016.1.150/linux/mkl/lib/intel64:/opt/intel/compilers_and_libraries_2016.1.150/linux/tbb/lib/intel64/gcc4.4:/opt/intel/debugger_2016/libipt/intel64/lib:/opt/intel/compilers_and_libraries_2016.1.150/linux/daal/lib/intel64_lin:/opt/intel/compilers_and_libraries_2016.1.150/linux/daal/../tbb/lib/intel64_lin/gcc4.4:/opt/intel/compilers_and_libraries_2016.1.150/linux/daal/../compiler/lib/intel64_lin

Also, a check on the linked libs gives the correct path, and the file exists there:

$ ldd <executable>
	linux-vdso.so.1 =>  (0x00007ffdb61a9000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe9de805000)
	libiomp5.so => /opt/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.so (0x00007fe9de4c3000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe9de2a5000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe9ddee0000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe9ddcca000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe9ddac6000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fe9deb0b000)

A check on the executable and the lib file gives:

$ file <executable><executable>: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=e26b6f0875d1709c83a190d5bc00d4f447c2836d, not stripped

$ file /opt/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.so
/opt/intel/compilers_and_libraries_2016.1.150/linux/compiler/lib/intel64/libiomp5.so: ELF 64-bit LSB  shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

I don't see anything wrong. Could someone tell me what I might be doing wrong?

Thanks!

Error building netcdf-fortran

$
0
0
Hello,

I'm building netcdf-fortran-4.4.2 with intel compilers (Intel(R) 64, Version 16.0.0.109).
Note that previously netcdf-4.3.3.1 was built without errors.

The process is:
$ source compilervars.csh intel64
$ configure --prefix=$HOME/intellibs
$ make
$ make check

The make check output fails:
....
============================================================================
Testsuite summary for netCDF-Fortran 4.4.2
============================================================================
# TOTAL: 5
# PASS:  4
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See nf_test/test-suite.log
Please report to support-netcdf@unidata.ucar.edu
...

Then, the nf_test/test-suite.log reports:
...
*** testing nf_set_default_format ...
bad default format: status = %dNo error

###            2  FAILURES TESTING nf_set_default_format! ###
Total number of failures:            2
2
FAIL nf_test (exit status: 2)
Any suggestion?
Thanks,
Omar.

PS: As suggested in the log file I've contacted unidata, but they do not offer support for intel compilers.

no match for rank>1 to a generic procedure with assumed-rank dummy

$
0
0

Hi,

the intel 16.0.1 compiler gives an error with the attached program:

ifort bug_derivedtype_assumedrank_generic.f90
bug_derivedtype_assumedrank_generic.f90(42): error #8486: There is no matching specific subroutine for this type bound generic subroutine call.   [PRINT]
 call b%print(m2)
--------^
compilation aborted for bug_derivedtype_assumedrank_generic.f90 (code 1)

I can call the subroutine print1 directly, but it doesn't match as part of the generic print. This looks like a compiler issue.

 

ifort: command not found

$
0
0

I completed installing the parallel studio xe 2016.1.056 for linux on my centos 7.

For using ifort command, I implemented the following commands,

#./opt/intel/bin/ifortvars.sh intel64

#./opt/intel/bin/compilervars.sh intel64.

But still I get "ifort: command not found" when I use ifort command.

What is the problem? Please help me...

 

 

[Intel STM Compiler]BetaSTMCCompl could not be obtatined

$
0
0

 

Hello, Thank you for reading my post,

I installed Intel stm compiler today and I got a serial number only students for 30 days(?).

After install, I got an error to compiling with this stm compiler.

This error shows below,

scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
(COMPILE)  build/library/common/debug.c

Error: A license for BetaSTMCCompL could not be obtained.

Your license has expired.

License file(s) used were (in this order):
    1.  Trusted Storage
    2.  /opt/intel/Compiler/11.0/606/licenses
    3.  /opt/intel/licenses/l_LWSJNJ7L.lic
    4.  /intel/licenses
    5.  /Users/Shared/Library/Application Support/Intel/Licenses
    6.  /opt/intel/Compiler/11.0/606/bin/intel64/l_cpp_32e_cd.lic

Please visit http://www.intel.com/software/products to obtain license renewal information.

icc: error #10052: could not checkout FLEXlm license
scons: *** [build/library/common/debug.o] Error 1
scons: building terminated because of errors.

I got a new license 3 days ago, but compile error said my license expired.

I already know that stm compiler no longer maintained. But please tell me how to do this..?

Thank you reading my post.

 

C application that invokes Intel Fortran

$
0
0

Hi.  I would appreciate some links that explain the options required for building a gcc C application that invokes pre-existing Intel Fortran subroutines and functions.  This would include compilation and link options.  A quick rundown would be great if that's easier.  Also, indications for replacing gcc with Intel C/C++ would be of interest; the application does not use parallel processing.

Jay


IFort: Internal compiler error: segmentation violation signal raised

$
0
0

Hi,

Upon trying to compile a box model (effectively: https://github.com/barronh/DSMACC ) with a very large dataset, I get the following bug:

ifort -cpp  -fp-model strict   -c model_Rates.f90

/tmp/ifortn2jCHh.i90: catastrophic error: **Internal compiler error: segmentation violation signal raised** Please report this error along with the circumstances in which it occurred in a Software Problem Report.  Note: File and line given may not be explicit cause of this error.

compilation aborted for model_Rates.f90 (code 1)

make: *** [model_Rates.o] Error 1

The program works fine normally, however with the large dataset I might have to concatenate a couple of lines as I reach the continuation line limit. That said these files then compile normally, until I encounter the above. I am running on a computer with 256gb memory (although I can increase this if needed), so that shouldn't be a problem. 

Has anyone got any suggestions on what I could try to resolve this?

Thanks in advance!

 

P.S. I am using ifort-13 and openSuse.

Using Generic Interfaces and Parameterized Types for selective early binding

$
0
0

I am using a parameterized type (called dispersion_type in the code) to select a function based on the value of a kind parameter of the type (namely, fkind). The different functions would have identical signatures if not for the additional argument of type dispersion_type(fkind).  With the additional argument, the functions can be collected under a  generic interface.  If the name of the generic interface is different from dispersion_type, the program works as desired.

If the name is the same, the code compiles and works with IFORT 15.0.1, but fails with IFORT 16.0.0, with the error

early_binding.f90(44): error #6593: The number of expressions in a structure constructor differs from the number of components of the derived type.   [DISPERSION_FORCE#2]

I think the code is correct though: in line 44, the second argument of dispersion_type(5., *) should call the structure constructor of dispersion_type, since there is no match available under the generic name.  The call to dispersion_type(5., *) itself should be to one of the overloaded versions available under the generic name.  It seems IFORT 16.0.0 decides there is no match and then tries to invoke the structure constructor again, which results in an error. Comments?

Module pairwise_potential
! Using a generic interface to bind procedures to parameterized types at compile times.
! The method works if the name of the type dispersion_force is DIFFERENT
! from the name of the generic interface, but it should work when the names
! are the same, too. That would be neater.
   Implicit None

   Type dispersion_force(fkind)
      Integer, Kind :: fkind = 2
   End Type dispersion_force

   Interface dispersion_force
      Module Procedure first_force
      Module Procedure second_force
      Module Procedure third_force
   End Interface dispersion_force

Contains

   Real Function first_force(rs, fkind)
      Real, Intent(In)                  :: rs
      Type(dispersion_force(1)), Intent(In) :: fkind

      first_force = 1.
   End Function first_force

   Real Function second_force(rs, fkind)
      Real, Intent(In)                  :: rs
      Type(dispersion_force(2)), Intent(In) :: fkind

      second_force = 2.
   End Function second_force

   Real Function third_force(rs, fkind)
      Real, Intent(In)                  :: rs
      Type(dispersion_force(3)), Intent(In) :: fkind

      third_force = 3.
   End Function third_force

   Subroutine verify_association
      Integer, Parameter :: fkind = 2

      Print *, 'The force kind is ', dispersion_force(5., dispersion_force(fkind)())

      !The above works with IFORT 15.0.1, but does not compile with IFORT 16.0.0
      !Furthermore, since the type dispersion_force has the default fkind=2, I expect
      !the following to also compile

      !Print*, 'The force kind is ', dispersion_force(5., dispersion_force)
      !Print*, 'The force kind is ', dispersion_force(5., dispersion_force(fkind))
   End Subroutine verify_association

End Module pairwise_potential

Program test
   Use pairwise_potential

   Call verify_association
End Program test

 

Older Version of Compiler Not Recognizing My Manually Generated License File (urgent)

$
0
0

Hello.  I am in urgent need of some guidance.  I recently purchased a single named-user license for Intel's Fortran Compiler for Linux.  While the baseline purchase was for the newest 2016 version of the compiler, a current project requires that I download the 2013 Update 2 version of the compiler.  I followed the online instructions for downloading and installing an older version of the compiler.  In addition, before trying the installation, I followed the instructions for registering my product and manually creating and downloading a license file based on the host ID of my target system.  When I try to install the product and point the installer to my manually generated license file, I get the following error message:

"The license file(s) you provided is not valid for this product."

I am at a loss as to what's going on.  I followed the Intel online instructions verbatim and it's not working.  I've submitted an issue to Premier, but have yet to hear back.  In the meantime, I thought I'd also drop a thread on this forum.  Any guidance would be much appreciated.

 

Thanks.

Illegal instruction when running programs compiled by mpifort

$
0
0

Hi all,

Recently I compiled VASP using Intel Fortran Compilers, but the program does not seem to work properly on my cluster. I got errors like:

 running on    1 total cores
 distrk:  each k-point on    1 cores,    1 groups
 distr:  one band on    1 cores,    1 groups
 using from now: INCAR
 vasp.5.3.2 13Sep12 (build Dec 31 2015 22:13:40) complex

forrtl: severe (168): Program Exception - illegal instruction
Image              PC                Routine            Line        Source
vasp               00000000011296A5  Unknown               Unknown  Unknown
vasp               0000000001127467  Unknown               Unknown  Unknown
vasp               00000000010BD1F4  Unknown               Unknown  Unknown
vasp               00000000010BD006  Unknown               Unknown  Unknown
vasp               000000000105F2D6  Unknown               Unknown  Unknown
vasp               00000000010655A8  Unknown               Unknown  Unknown
libpthread.so.0    00007F7374785340  Unknown               Unknown  Unknown
vasp               0000000000494457  Unknown               Unknown  Unknown
vasp               0000000000495AEC  Unknown               Unknown  Unknown
vasp               0000000000406468  Unknown               Unknown  Unknown
vasp               000000000040531E  Unknown               Unknown  Unknown
libc.so.6          00007F73740CBEC5  Unknown               Unknown  Unknown
vasp               0000000000405229  Unknown               Unknown  Unknown

The disassembly of the code is:

(gdb) disassemble
Dump of assembler code for function lattice_mp_lattic_:
   0x0000000000494420 <+0>:    vmovsd 0x30(%rdi),%xmm0
   0x0000000000494425 <+5>:    vmovsd 0x40(%rdi),%xmm15
   0x000000000049442a <+10>:    vmovsd 0x38(%rdi),%xmm14
   0x000000000049442f <+15>:    vmovsd 0x18(%rdi),%xmm8
   0x0000000000494434 <+20>:    vmulsd %xmm15,%xmm0,%xmm3
   0x0000000000494439 <+25>:    vmulsd %xmm14,%xmm8,%xmm10
   0x000000000049443e <+30>:    vmovsd 0x28(%rdi),%xmm2
   0x0000000000494443 <+35>:    vmovsd 0x48(%rdi),%xmm13
   0x0000000000494448 <+40>:    vmovsd 0x20(%rdi),%xmm1
   0x000000000049444d <+45>:    vmovsd 0x10(%rdi),%xmm6
   0x0000000000494452 <+50>:    vmovsd 0x8(%rdi),%xmm7
=> 0x0000000000494457 <+55>:    vfmsub231sd %xmm2,%xmm13,%xmm3
   0x000000000049445c <+60>:    vmulsd %xmm1,%xmm13,%xmm4
   0x0000000000494460 <+64>:    vfmsub231sd %xmm13,%xmm7,%xmm10
   0x0000000000494465 <+69>:    vmulsd %xmm6,%xmm13,%xmm9
   0x0000000000494469 <+73>:    vmulsd %xmm7,%xmm15,%xmm11
   0x000000000049446d <+77>:    vfmsub231sd %xmm0,%xmm14,%xmm4
   0x0000000000494472 <+82>:    vmulsd %xmm2,%xmm8,%xmm12
   0x0000000000494476 <+86>:    vfmsub231sd %xmm15,%xmm8,%xmm9
   0x000000000049447b <+91>:    vmulsd %xmm13,%xmm13,%xmm13
   0x0000000000494480 <+96>:    vfmsub231sd %xmm6,%xmm14,%xmm11
   0x0000000000494485 <+101>:    vmulsd %xmm14,%xmm2,%xmm5
   0x000000000049448a <+106>:    vfmsub231sd %xmm6,%xmm0,%xmm12
   0x000000000049448f <+111>:    vfmadd213sd %xmm13,%xmm14,%xmm14
   0x0000000000494494 <+116>:    vmulsd %xmm7,%xmm0,%xmm13
   0x0000000000494498 <+120>:    vfmsub231sd %xmm15,%xmm1,%xmm5
   0x000000000049449d <+125>:    vmulsd %xmm0,%xmm0,%xmm0
   0x00000000004944a1 <+129>:    vfmadd213sd %xmm14,%xmm15,%xmm15
   0x00000000004944a6 <+134>:    vfmsub231sd %xmm8,%xmm1,%xmm13
   0x00000000004944ab <+139>:    vmulsd %xmm1,%xmm6,%xmm14
   0x00000000004944af <+143>:    vfmadd213sd %xmm0,%xmm1,%xmm1
   0x00000000004944b4 <+148>:    vsqrtsd %xmm15,%xmm15,%xmm15
   0x00000000004944b9 <+153>:    vfmsub231sd %xmm2,%xmm7,%xmm14
   0x00000000004944be <+158>:    vfmadd213sd %xmm1,%xmm2,%xmm2

I looked up my /proc/cpuinfo, and the flags are:

fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid

seem to have SSE support. I'd like to know if anything is wrong with my setup. Thanks!

 

va_list Fortran implementation: Compiles fine but gives runtime errors

$
0
0

I'm trying to come up with the object to store scalars and arrays in one type. It will ultimately allow me to pass arbitrary number of some predefined objects into any function. The code is compiled fine but does seg fault during running.

program TEST
IMPLICIT NONE

type field
	class(*), allocatable :: val
end type field

type List
	type(field),dimension(:),allocatable :: fields
end type List

type(List) :: l
type(field) :: f1
type(field) :: f2

real :: a,b
integer(kind=2) :: n,i
real(kind=8),dimension(:),allocatable :: c

a=2.5
n=37
b=3.14

allocate(l%fields(10))
allocate(f1%val,source=a)
allocate(f2%val,source=n)
allocate (l%fields(3)%val,source=b)

l%fields(1)=f1
l%fields(2)=f2

allocate(c(10))
!this is what causing to segfault
allocate(l%fields(4)%val,mold=c)

print *, size(l%fields)

do i=1,size(l%fields)
    print *, "index=",i
	select type (val => l%fields(i)%val)
	type is (integer)
		print '("Value is an integer: ", I0)', val
	type is (integer(kind=2))
		print '("Value is an integer(kind=2): ", I0)', val
	type is (real)
		print *, "Value is a real: ", val
	class default
		print '("Unknown type for index:", I0 )', i
	end select
end do

stop
end program TEST

I'm sure that my way of using 'mold' is wrong in this context. But Intel compiler can do better job to catch it during compile time I guess...

Another question is if anyone can suggest any idea how to store multiple types of scalars and arrays in one derived type so that I could pass list of them to the function and be able to extract data out of there?

This is basically an effort to implement 'void' type and arbitrary number of arguments in any given function.

Thanks,

Anar.

Viewing all 2746 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>