Quantcast
Channel: Fortran
Viewing all 3108 articles
Browse latest View live

are include statements in subroutines safe for mutithreading?

$
0
0

HI 

This may the the first of many questions about running or rewriting an application with

ThreadModel Free  ( the application works fine in ThreadModel Apartment)

I upgraded to visual fortran compiler XE 15.04.221 , but still using IA-32 build. 

 

I have read that COMMON blocks are a problem for multithreading because they can

lead to racing , is that correct??

So when now passing arrays between subroutines on the subroutine argument list

instead of in common blocks, does the use of include statements in subroutines

to dimension arrays on the subroutine argument list, or to dimension arrays

local to the subroutine cause racing, or is it threadsafe??  

Example

apple is an include with two parameter statements 

INTEGER, PARAMETER ::NPCOUNT =405

INTEGER,PARAMETER :: KREAL = 355

 

So then are these ok to do, the first subroutine dimensions an array on the calling list with the include parameter value,

the second subroutine dimensions a local array in the subroutine with the include parameter value....

SUBROUTINE Fort01(MAIN1)

INCLUDE 'apple'

DIMENSION MAIN1(NPCOUNT)

RETURN

END

 

and

SUBROUTINE Fort02(MAIN1,IMAIN1)

INCLUDE 'apple'

DIMENSION MAIN1(IMAIN1)

DIMENSION LOCAL1(KREAL)

RETURN

END 

Thanks

BIll


How do I properly create a dll?

$
0
0

Hello,

I am attempting to create dll files in Fortran.  If I am not mistaken, I am supposed to export a .dll file from my project, which is a .f90 file as opposed to a .dll file, in order for another program (written in Basic) to link to it.  To get things started, I have made a simple program in Fortran that goes as follows:
 

! TestDLL.f90 

!
!  FUNCTIONS/SUBROUTINES exported from TestDLL.dll:
!  TestDLL - subroutine
!
subroutine TestDLL

  ! Expose subroutine TestDLL to users of this DLL
  !
  !DEC$ ATTRIBUTES DLLEXPORT::TestDLL

  ! Variables
    Integer K

 ! Body of TestDLL
    K = 1

    Return

end subroutine TestDLL

 

However, when I create the .dll file by running this program, I see the following when I open the .dll file in a text editor:

 

This program cannot be run in DOS mode.

Stack around the variable '' was corrupted. The variable '' is being used without being initialized.  The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

A cast to a smaller data type has caused a loss of data.  If this was intentional, you should mask the source of the cast with the appropriate bitmask.

Changing the code in this way will not affect the quality of the resulting optimized code.

    Stack memory was corrupted

    A local variable was used before it was initialized

   Stack memory around _alloca was corrupted

 Unknown Runtime Check Error

   Runtime Check Error .

Unable to display RTC Message.   Run-Time Check Failure  Unknown Filename   Unknown Module Name Run-Time Check Failure  Stack corrupted near unknown variable   user32.dll   wsprintfA   Stack area around _alloca memory reserved by this function is corrupted

Stack area around _alloca memory reserved by this function is corrupted A variable is being used without being initialized.

Stack pointer corruption
Cast to smaller type causing loss of data
Stack memory corruption Local variable used before initialization
Stack around _alloca corrupted

                                                                                                                        <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"><trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel></requestedPrivileges></security></trustInfo></assembly>

Where could I going wrong here?

Thanks,

Jamal
 

 

 

                                                                                                                                                                                                                         

 

 

Fortran with C

$
0
0

Hi everybody,

I use intel visual fortran composer xe 2013 with VS2012.

I have 3 questions:

1-I have a problem debugging a simple fortran code that calls a C function. When i compile the fortran code on VS2012 i get the following message: Error    2     error LNK2019: unresolved external symbol _print_C referenced in function _MAIN__    Source1.obj.  I attached the fortran and c files.

2-When i compile any fortran code on VS2012 i have no problem at all, but if i use a command prompt and type ifort example.f90 i receive the following message 'ifort' is not recognized as an internal or external command. I know i should do something to link ifort into compiling with a command prompt window but i don't know what it is. I read the documentation and i couldn't find what i need.

3-I bought the fortran composer xe like 2 years ago, now i was checking and there's something called parallel xe 2015, so is this the new version of composer xe or something different ?

Thanks in advance,

Li

 

 

Fichier attachéTaille
Téléchargerhello.c445 octets
TéléchargerSource1.f903.07 Ko

open file using newunit directive, threadsafe fortran

$
0
0

HI Lorri, others,

I have just one more question before I dive in and try to play

with rewriting parts of my application for threadsafe, and it

relates to reading the input data.  

Each thread independently processes in the same way , without any sharing

of results between the threads, data from the single data file submitted to the thread.

The file is identified by a full path, such as c:\mydatafiles\exmpl001.dat as the first argument from the c== calling interface

The results of the processing at the end of each thread are passed back out to the interface

to be reported there, and the thread is closed. In many instances the results are just written back to the interface

in memory. In some applications the results are written out to a physical data file, but first I will be trying how things work

just with the memory dump, to reduce the file handling needed with the writing. 

 

Each file has the same binary file format, but different data.  Since some of the files could have a lot more data than others

the processing time and usage of features in the subroutines will be different between the threads.

 

Would this general approach be expected to work ----:???

The only file reading is done in the main routine using

open(newunit=NWI8,file=DSNX,form='binary') 

up front as the first task as soon as the data path and file name are parsed

such as DSNX = C:\mydata\exmpl001.dat,  then do all the file reading in the main routine into arrays,

close the unit NWI8, and then pass the arrays via argument lists to the subroutines downstream.

When I am doing this, I would expect that a valid & different value of NWI8 would be generated for each thread,

so the correct data file would be read in each thread without racing. Should I expect that this would work????

OR,

Should I expect that I have to take more precautions to manage the overall process, such as

I have to have the c++ calling interface that wants to do multithreading to my main program rewritten provide a different

valid unit number to me --  currently the c++ calling interface is only passing the path of the datafile,

and I have no information for how many total threads (meaning individual datafiles that might be wanting to run concurrently).  

Today all I have from the c++ interface is stdcall  myprogram(datafilepath, ......other processing arguments)

whereas I might have to have the calling interface rewritten such as stdcall myprogram(unit number,datafilepath,max number of

threads, .......other processing arguments) 

 

Finally,  am I correct in assuming that it is better to do all the file reading in the main routine, even though it would be

better & more elegant if I could use a variation of the file reading, which currently is its own subroutine???

 

thanks for your advice and patience with my questions...

Bill

 

 

 

 

 

Intel® Advisor Tutorials

$
0
0

Intel® Advisor 2015

The following tutorials provide a quick path to help you get started using the Intel® Advisor 2015. They demonstrate an end-to-end workflow you can ultimately apply to your own applications:

  1. Survey the target executable to locate the loops and functions where your application spends the most time.
  2. In the target sources, add Intel Advisor annotations to mark possible parallel tasks and their enclosing parallel sites.
  3. Check Suitability to predict the maximum parallel performance speedup of the target based on these annotations.
  4. Check Correctness to predict parallel data sharing problems in the target based on these annotations.
  5. If the predicted maximum speedup benefit is worth the effort to fix the predicted parallel data sharing problems, fix the problems.
  6. Recheck Suitability to see how your fixes impact the predicted maximum speedup.
  7. If the predicted maximum speedup benefit is still worth the effort to add parallelism to the target, replace the annotations with parallel framework code that enables parallel execution.
Learn To Do ThisTake This Tutorial

Find Where to Add Parallelism with Intel Advisor 2015
Duration: 15-20 minutes

C++ Tutorial
Windows* OS: HTML | PDF
Linux* OS: HTML | PDF
Sample code: nqueens_Advisor

Fortran Tutorial
Windows* OS: HTML | PDF
Linux* OS: HTML | PDF
Sample code: nqueens

Intel® Advisor 2013

Use the following tutorials to help you get started profiling your application and adding Intel Advisor annotations, predicting your program's parallel behavior, and adding parallel code to the selected parallel regions.

Learn To Do ThisTake This Tutorial
Find Where to Add Parallelism with Intel Advisor 2013
Duration: 30+ minutes

C++ Tutorial
Windows* OS: HTML | PDF
Linux* OS: HTML | PDF
Sample code: nqueens_Advisor

Fortran Tutorial
Windows* OS: HTML | PDF
Linux* OS: HTML | PDF
Sample code: nqueens

  • Linux*
  • Microsoft Windows* (XP, Vista, 7)
  • Microsoft Windows* 8.x
  • C/C++
  • Fortran
  • Intel® Parallel Studio XE
  • Intel® Parallel Studio XE Cluster Edition
  • Intel® Parallel Studio XE Professional Edition
  • Intel® Advisor
  • URL
  • Featured Product Support
  • Code Coverage for static library

    $
    0
    0

    Hi, I wondered if anyone had used the Intel codecov tool for analysis of a static library.

    I am building a static library comprising mainly algorithmic content which I want to analyse and also have a driver program which is used to test the library. The driver is linked against a static .lib. If I follow the examples in the documentation and compile everything with /Qcov-gen I get a dyn file in the exe directory and when I use the tools on that it gives me coverage analysis for the exe not for the library. However it is the library I am most interested in.

    Currently working on Windows in Visual Studio but also doing Linux and MacOSX builds as well if someone has a solution for that.

    Optimizer bug

    $
    0
    0

    The following test program gives incorrect results when options such as /Ot, /O2, /fast are used on Windows 8.1 with the 32 and 64-bit IFort compiler version 15.0.4.221. Earlier versions of the compiler, such as 11.1.070, give correct results whether or not optimization is requested.

    program chk
        implicit none
        integer :: nmtdata=240,nmtfreq=60,i,j,k
        integer :: imtfreqnum(240),indexmtfreq(60)
    !
        data imtfreqnum/                                                   &
          1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5,      &
          6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9,10,10,10,10,      &
         11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,      &
         16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,      &
         21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,      &
         26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,      &
         31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,      &
         36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,      &
         41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,      &
         46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,      &
         51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,      &
         56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60/
    !
        data indexmtfreq/                                                  &
          1, 2, 3, 5, 6, 7, 9,10,11,13,14,15,17,18,19,21,22,24,25,26,      &
         27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,      &
         47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66/
    !
        do i=1,nMTdata
            k=iMTFreqNum(i)
            do j=1,nMTFreq
                if(k==j)then
                    iMTFreqNum(i)=indexMTfreq(j)
                endif
            enddo
        enddo
        write(*,'(A,/,(20i5))')'iMTFreqNum  ',iMTFreqNum(1:nMTData)
        end

    The correct output of an increasing sequence of integers in the range 1 to 66, and is obtained using /Od. With optimization, the output consists entirely of 0-s.

    This example code was synthesized on the basis of the problematic code given in this recent thread in this forum: https://software.intel.com/en-us/forums/topic/584169 .

    I note that the inner DO loop could be replaced by iMTFreqNum(i)=indexMTfreq(k), but if we did so we would not see the optimizer bug at all.

    error in install Intel Parallel Studio XE 2015 Update 1 Cluster Edition for Fortran and C++


    Merge without temporary arrays

    $
    0
    0

    Hello,

    The MERGE function seems to use temporary arrays for both, tsource and fsource, arguments when the program is compiled in the Debug mode. Hence, the following simple code throws an exception:

    real :: pos(3) = [.1, .2, .3]
    real :: neg(2) = [.8, .9]
    integer :: ptrs(5) = [1, 2, -1, -2, 3]   ! Index in (pos) if positive, minus index in (neg) if negative
    real :: vals(5)
    
    vals = merge(pos(ptrs), neg(-ptrs), ptrs > 0)

    forrtl: severe (408): fort: (3): Subscript #1 of the array NEG has value -1 which is less than the lower bound of 1

    This modification also doesn't work:

    forall (i = 1:5) vals(i) = merge(pos(ptrs(i)), neg(-ptrs(i)), ptrs(i) > 0)

    In the Release mode both work fine.

    Why does MERGE need to compute both arguments in the Debug mode and is there an elegant way to rewrite this code without going into dumb for-if-else-then constructions?

    Thank you.

    cannot open file libucrt.lib

    $
    0
    0

    Hi,

    I used to have on my old computer the Intel Visual Fortran Composer XE 2011, integrated with Microsft Visual Studio 2010, and with IMSL 6.

    Now I have upgraded to the Intel Parallel Studio XE Composer Edition for Fortran Windows* with Rogue Wave* IMSL* 7.0.

    What is happening is that now, some of my Fortran programs are not compilling. It gives me the following error:

    fatal error LNK1104: cannot open file libucrt.lib

    Do you know why this happens? can you help?

    Thanks

    Showing output from DLL in console

    $
    0
    0

    Hello,

    I am working on a program where I am using Visual Basic for the interface and a Fortran dll for computations.  When I call the DLL using an event in the Visual Basic interface, I would like to print a message to the user through the console using the write() function in Fortran, while also having the VB interface open as well.  

    If it is helpful for you to know, my previous attempts to do this have so far failed:  when I do not include the pause statement, nothing seems to happen (the console possibly opens then closes before I can even see it). However, when I do include a pause statement, the console flickers on and off endlessly.

    How do I go about getting this to work?

    Thanks,

    Jamal

    what's wrong with this IF statement

    $
    0
    0

    Is there a problem with the following syntax?  Even though IOUT is .false. and IHEAD=1 and ITAIL=400, the code still runs the statement inside the IF.  I can even select the entire expression inside the IF (   )  and the debugger says it evaluates to FALSE.  What the heck is going on?

            IF (IOUT .OR. IHEAD .GT. ITAIL) THEN
               CALL UMD2ER (1, ICNTL, INFO, -3, INFO (19))
            ENDIF 

     

    Within Fortran, Call Matlab

    $
    0
    0

    Hi,

    I have a question about how to call Matlab script within Fortran, which performs Matlab parallel computing "parfor" syntax. Basically, I am solving a problem in Fortran which is mainly a Do-Loop. For each iteration, I write out a series from Fortran for a Matlab script to read in, process through "parfor", and write back to Fortran. Fortran iteration continues until convergence.

    In my Fortran codes, I use call system to let the shell return to Linux commands and call matlab, run matlab script, exit matlab and return to Fortran.

          CALL system(" matlab -nodesktop -nojvm -r 'Matlab_script; exit'")

    The codes look like the above. ifort compiles the entire program with no problem. Also, the entire Fortran program runs fine and the results are correct.

    However, the problem is that within Matlab_script.m, a matlab parfor loop should be executed. Rather, the loop was executed in plain "for, ..., end" loop. It takes so long for Fortran to get back the matlab processed results. I tested the Matlab_script.m without Fortran call system() and the parfor loop goes fine. 

    Does anyone know

    1. is there a better way to let Fortran handle over to Matlab to process, wait and get back the results besides Call System() ?

    2. Why call system does not implement the matlab parfor function?  

    Please advise. Thank you so much!

    Calvin

     

    Problem installing Intel Fortran Compiler XE 2015 on Linux

    $
    0
    0

    Hi,

    I am having troubles downloading intel fortran/c++ compiler 15 (professional) linux (specifically CentOS 6.6)

    I have followed the instructions.

    1. I extracted the tgz archive 

    2. I ran the install.sh script (activated 31 day trial)

    3. ran the advixe-vars.sh script

    So it should be complete at this point? I try running 

    ifort -v

    and the command is not recognized.

     

    Secondly, I have tried adding the following to my .bashrc file:

    export LDLIBRARYPATH="/opt/intel/advisor_xe/lib64"

    export DYLDLIBRARYPATH="/opt/intel/advisor_xe/lib64"

    export MANPATH="/opt/intel/advisor_xe/man"

    export PATH=/opt/intel/advisor_xe/bin64:$PATH

     

    with the same results

    executable hanging in OpenMP region

    $
    0
    0

    We updated from version 13.1 of the compiler to 15.0.2.179 for a large CFD FORTRAN code and started having cases of the solver hanging: sitting in memory with 0% CPU used. Here are the observations so far:

    1. happens only on Windows.

    2. running on a single thread works fine.

    3. the executable runs for a while before it hangs. restarting the solver from an intermediate time runs fine.

    4. for the cases we have so far, it hangs in different parts of the code, but for a given case it always hangs at the same location.

    Here is a code snippet where it happens in one of the cases. This is a sub-section of a large subroutine. This code is invoked several million times before the solver hangs:

    c Here we are adding a column to the Hessenburg matrix (hmatrix)
            do kk=1,igfy
              hmatrix(kk,igfy)=zero
              do n=1,numthrds
                flp_lcl(1,n)=hmatrix(kk,igfy)
              enddo
    c
              do nbl=1,nblcks
    ! divide the loop between threads
                call load_bal(0,ijklim(nbl,1),nijkpr(nbl)) ! NBL is a global variable, comes from a module
    !$omp parallel do schedule(static,1)
    !$omp& private(n,nn,ijk)
                do n=1,numthrds ! loop over threads
                  do nn=klo(n),khi(n)
                    ijk=ijkpr(nn)
                    flp_lcl(1,n)=flp_lcl(1,n)+vvect(ijk,igfyp1)*vvect(ijk,kk)
                  enddo

    ! PUTTING A PRINT STATEMENT HERE PRINTS ALL THREADS.
                enddo ! THIS IS THE LINE WHERE IT HANGS.
              enddo

    Could this have been resolved in version 15.4 or 16.0 of the compiler?

    Thank you for any help you can provide.

    Michael


    "fatal error LNK1104: cannot open file 'uuid.lib'" and "WindowsSdkDir not found"

    $
    0
    0

    Hello,

    I have Intel visual Fortran 11.0 and Microsoft Visual Studio 2008 on my system to compile my user-defined subroutines dll to run them with Adina software. I was able to compile my code in widows command console using the makefile that Adina provides. Recently, I installed visual studio 2015 to work on some C# codes. In order to be able to compile the C# codes in windows command console, I edited the path system variable to C:\Windows\Microsoft.NET\Framework64\v4.0.30319. However, I noticed that I am not able to compile Adina anymore. The error message after running Adina makefile was:

    Microsoft (R) Program Maintenance Utility Version 9.00.21022.08

    Copyright (C) Microsoft Corporation.  All rights reserved.

    Could Not Find C:\ADINA89\usrdll64\adusr.*

            link.exe /OUT:"adusr.dll" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFIL

    E:"adusr.dll.intermediate.manifest" /SUBSYSTEM:WINDOWS /IMPLIB:"adusr.lib" /DLL

    ovl20u.obj ovl30u.obj ovl40u.obj ovl50u.obj ovl60u.obj  ovl100u.obj ovl110u.obj

    ovl160u.obj ovl170u.obj  ovl30tu.obj ovl40tu.obj ovl90tu.obj  ovl20u_vp1.obj ovl

    30u_vp1.obj ovl40u_vp1.obj ovlusr.obj

    LINK : fatal error LNK1104: cannot open file 'uuid.lib'

    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\

    VC\BIN\amd64\link.exe"' : return code '0x450'

    Stop.

    I tried to set the ifortdir again and I got the following massage:

    Setting environment for using Microsoft Visual Studio 2008 Beta2 x64 tools.

    WindowsSdkDir not found

    I added the variable “WindowsSdkDir” with the value of “C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A”, yet it did not work.
    I will appreciate if someone can give me a hint to fix the problem.

    P.S.

    I can compile and build FORTRAN codes using visual studio 2008 but not using the windows command console and Adina makefile. 

    Diagnostic 3180: unrecognized OpenMP #pragma

    $
    0
    0

    The test code bellow worked with Intel Composer 2013 but not with SP1 Update 5,
    and gives me "Diagnostic 3180: unrecognized OpenMP #pragma".
    Thanks in advance.

    // OpenMPTest.cpp : Defines the entry point for the console application.
    //
    
    #include "stdafx.h"
    #include <map>
    #include <omp.h>
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	std::map<int, int> box;
    	box[0] = 0;
    	box[1] = 0;
    	box[2] = 0;
    
    #pragma omp parallel for
    	for (auto iter = box.begin(); iter != box.end(); ++iter) {
    		(*iter).second = rand();
    	}
    	return 0;
    }

     

    Conformity error (#6366)

    $
    0
    0

    I don't recall getting his compilation error:

    error #6366: The shapes of the array expressions do not conform.

    I researched it some and none of the other situations seemed to fit mine. I'm embedding the entire code here:

    Program Poppe
    
    !Input parameters are:
    !Pa          Atmospheric pressure (Pa)
    !Qw_in       Water inlet mass flow rate (kg/s)
    !Tw_in       Water inlet temp. (K)
    !Tw_out      Water outlet temp. (K)
    !Qa          Air mass flow rate (kg/s)
    !Wa_in       Air inlet humidity ratio   {kg vapor /kg dry air
    !Wa_out_est  Est. outlet air humidity ratio
    !Ha_in       Air inlet enthalpy (J/kg)
    !N           Number of intervals through the fill
    
    !Variable definitions:
    !DelTwlev  Water temp. drop across a single level.
    
    
    !Local variables:
    implicit none
    real(4) :: i_fgwo, cp_a, cp_v, DeltaTwLev, wa, wo_new, wo_old, Tref2, F1, F2, F3, F4
    real(4), dimension (10) :: TwLev, WaLev, HaLev, p_vsw, w_sw, RatioQw_Qa, H_masw, H_v, Le_f, cp_w, dw_dtw, dima_dTw
    real(4) :: delta1, z
    integer(4) :: j, k !Dummies.
    
    !Initialize the input parameters:
    real(4), parameter    :: Tref       =   273.15       !Reference temp. (K)
    real(4), parameter    :: Pa         = 10172.27       !Atmospheric pressure (Pa)
    real(4), parameter    :: Qw_in      =     3.99       !Water inlet mass flow rate (kg/s)
    real(4), parameter    :: Tw_in      =   312.82       !Water inlet temp. (K)
    real(4), parameter    :: Tw_out     =   300.92       !Water outlet temp. (K)
    real(4), parameter    :: Qa         =     4.134      !Air mass flow rate (kg/s)
    real(4), parameter    :: Wa_in      =     0.00616336 !Air inlet humidity ratio
    real(4), parameter    :: Wa_out_est =     0.02226    !Est. outlet air humidity ratio
    real(4), parameter    :: Ha_in      = 25291.87496    !Air inlet enthalpy (J/kg)
    integer(4), parameter :: N          = 10             !Number of intervals through the fill
    
    !NB: This system is designed for UNsaturated plume conditions.
    !Establish some constants for later use:
    i_fgwo = 3483181.4 - 5862.7703*Tref - 12.139568*Tref**2 - 0.0140290431*Tref**3    !Latent heat of vaporization, J/K (Eqn. A.4.5)
    
          DeltaTwLev = (Tw_in - Tw_Out)/N !Ave. temp drop over single level. (Eqn. 3.64)
    
    !     Initialize several variables for later use:
          do j = 0,N
            TwLev(j) = Tw_out + j*DeltaTwLev !Calculate the water temperature at this level. (Eqn. 3.63)
            WaLev(j) = Wa_in                 !Initialize the humidity ratio at this level.   (Eqn. ?)
            HaLev(j) = Ha_in                 !Initialize the air enthalpy at this level.     (Eqn. ?)
          enddo
    
          wa     = Wa_out_est !Est. an initial value for the outlet air humidity ratio which is determined iteratively.
          delta1 = 1          !Seed value
          wo_new = Wa_out_est !Est. outlet air humidity ratio
    
          Do while (delta1 > 1.0e-07) !Iteration to obtain outlet air humidity ratio for the calculation of mw/ma(subj):
            wo_old = wo_new
            do k = 0,N
              Tref2       = (TwLev(k) + Tref)/2.0 !Special reference temp. (K)
              cp_w        = 8155.9 - 28.0627*Tref2 + 0.0511283*Tref2**2 - 2.17582e-13*Tref2**6 !Specific heat of water (J/kg•K); Eqn. A.4.2
              z           = 10.79586*(1.0-(Tref/TwLev(k))) + 5.02808*log10(1.0-(Tref/TwLev(k))) + 0.000150474*(1.0-10.0**(-8.29692*((TwLev(k)/Tref)-1.0))) + 0.00042873*(10.0**(4.76955*(1.0-(Tref/TwLev(k))-1.0)) + 2.786118312 )
              p_vsw(k)    = 10**z !Vapor pressure @ saturation water temp. (N/m2)	(Eqn. A.2.1)
    
              w_sw(k)     = (2501.6 - 2.3263*(TwLev(k)-Tref) / 2501.6 + 1.8577*(TwLev(k)-Tref) - 4.184*(TwLev(k)-Tref)) * (0.62509*p_vsw(k) / (Pa-1.005*p_vsw(k)) ) - ( 1.00414*(TwLev(k)-TwLev(k)) / (2501.6 + 1.8577*( TwLev(k)-Tref) - 4.184*(TwLev(k)-Tref))) !(Eqn. A.3.5)
              RatioQw_Qa  = (Qw_in/Qa)*( 1.0 - (Qw_in/Qa)*(wa-WaLev(k)))  !Uses outlet humidity ratio (wa) assumed above. (Eqn. 3.32)
    
              cp_a   = 1045.356 - 0.03161783*Tref2 + 0.0007083814*Tref2**2 - 2.705209e-07*Tref2**3 !Specific heat of air   (J/kg•K) @Tref (Eqn. A.1.2)
              cp_v   = 0.0013605 + 2.31334*Tref2 - 2.46784e-10*Tref2**5 + 5.91332E-13*Tref2**6     !Specific heat of vapor (J/kg•K) @Tref (Eqn. A.2.2)
    
              H_masw(k)   = cp_a*(TwLev(k)-Tref) + w_sw(k)*i_fgwo*Tref+w_sw(k) * cp_v*(TwLev(k)-Tref) !Enthalpy (Eqn. A.3.7b)
              H_v(k)      = i_fgwo*cp_v*(TwLev(k)-Tref)                                               !Vapor enthalpy (Eqn. A.3.8)
              LE_f(k)     = 0.866**0.667*( ((((w_sw(k)+0.622)/(WaLev(k)+0.622)))-1.0) / log(W_sw(k)+0.622/WaLev(k)+0.622) )
    
              F1          = cp_w(k)*(W_sw(k)-WaLev(k))
              F2          = H_masw(k) - HaLev(k)
              F3          = (Le_f(k)-1.0)*( H_masw(k)-HaLev(k) - ((w_sw(k)-WaLev(k))* H_v(k)) )
              F4          = (w_sw(k)-WaLev(k))* cp_w(k) * (TwLev(k)-Tref)
    
    !dw_dtw(k) = 10.2 !This line compiles fine !!
              dw_dtw(k)   = (RatioQw_Qa * F1) / (F2+F3-F4)
              dima_dTw(k) = RatioQw_Qa * cp_w(k) * (1.0 + ((TwLev(k)-Tref)*F1)/(F2+F3-F4) )
    
              WaLev(k+1)  = WaLev(k) + (dw_dtw(k)*DeltaTwLev)
              HaLev(k+1)  = HaLev(k) + (dima_dTw(k)*DeltaTwLev)
    
    
            enddo
          EndDo !Do while
    
    end Program Poppe

     

    The error message pertains to these 2 variables:

    dw_dtw(k)

    dima_dTw(k)

    Intel® Math Kernel Library Documentation

    Problems installing Intel Fortran version 16

    $
    0
    0

    I am having several problems installing Intel Fortran version 16 from a user account (not root), using an offline license file.  

    First problem occurs at the end of installation.  Some final steps require root privileges:

    Finalizing product configuration...
    --------------------------------------------------------------------------------
    mkdir: cannot create directory `/home/documentation_2016': Permission denied
    ln: creating symbolic link `/home/documentation_2016/en/clck': No such file or directory
    mkdir: cannot create directory `/home/samples_2016': Permission denied
    ln: creating symbolic link `/home/samples_2016/en/clck': No such file or directory
    mkdir: cannot create directory `/home/documentation_2016': Permission denied
    ln: creating symbolic link `/home/documentation_2016/en/itac': No such file or directory
    mkdir: cannot create directory `/home/samples_2016': Permission denied
    ln: creating symbolic link `/home/samples_2016/en/itac': No such file or directory

    ------------------------------------------------------------------------------------------------------

    After that, the ifort command cannot find the license file:

    [braun@sequoia ~]$ ifort --version

    Error: A license for Comp-FL is not available now (-15,570,115).

    A connection to the license server could not be made.  You should
    make sure that your license daemon process is running: both an
    lmgrd process and an INTEL process should be running
    if your license limits you to a specified number of licenses in use
    at a time.  Also, check to see if the wrong port@host or the wrong
    license file is being used, or if the port or hostname in the license
    file has changed.

    License file(s) used were (in this order):
        1.  Trusted Storage
    **  2.  /home/braun/COM_L__FOR_FGG2-F4LNKDX3.lic
    **  3.  /home/braun/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64/../../Licenses
    **  4.  /home/braun/Licenses
    **  5.  /opt/intel/licenses
    **  6.  /Users/Shared/Library/Application Support/Intel/Licenses
    **  7.  /home/braun/intel/compilers_and_libraries_2016.0.109/linux/bin/intel64/*.lic

    Please visit http://software.intel.com/sites/support/ if you require technical assistance.

    ifort: error #10052: could not checkout FLEXlm license

    -------------------------------------------------------------------------------------------------------

    I am using the new license file sent by Intel:

    [braun@sequoia ~]$ pwd
    /home/braun
    [braun@sequoia ~]$ ls *.lic
    COM_L__FOR_FGG2-F4LNKDX3.lic

    Contents of license file:

    SERVER sequoia.jpl.nasa.gov 001018613F02 28518
    VENDOR INTEL
    PACKAGE I08C6A29D INTEL 2015.1231 38093429A840 COMPONENTS="Comp-FL \
            Comp-OpenMP Comp-PointerChecker DAAL-L DbgL FCompL MKernL" \
            OPTIONS=SUITE ck=44 SIGN=BB8277FA4734
    INCREMENT I08C6A29D INTEL 2015.1231 permanent 5 468137ACC88C \
            VENDOR_STRING="SUPPORT=COM \
            https://registrationcenter.intel.com" HOSTID=ANY \
            PLATFORMS="i86_r i86_re it64_lr it64_re amd64_re" BORROW=169 \
            DUP_GROUP=UH ck=67 SN=SMSAF4LNKDX3 SIGN=53CF5FDC6AFC
    #
    # SerialNumber=FGG2-F4LNKDX3
    #

    ---------------------------------------------------------------------------------------

    The environment variable is set (is this still the right name?)

    export INTEL_LICENSE_FILE=/home/braun/COM_L__FOR_FGG2-F4LNKDX3.lic

    -------------------------------------------------------------------------------------

    Finally, will the license file only work on the server named sequoia?  I have a 5-seat floating license using offline license files.

    Jay

    Viewing all 3108 articles
    Browse latest View live