Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28630 Discussions

excutable file can run on some computers but cannot run on some other computers

flyhigher2009
Beginner
762 Views
Under compaq visual fortran, I made a GUI to do numerical calculations. After porting the applications from compaq visual fortran to intel visual fotran, the executable file can run on some computer but cannot on some other computers. What's the reason with this?

Is it because of the systerm the computer used? How could I fix this problem and make the application run on
every computer?


Thanks a lot.

Bisheng

0 Kudos
11 Replies
DavidWhite
Valued Contributor II
762 Views
I suggest you check out the requirements for redistributable libraries ...
http://software.intel.com/en-us/articles/redistributable-libraries-of-the-intel-c-and-fortran-compiler-for-windows/

Note that you cannot redistribute debug versions of the libraries.

Also, if you are linking to the DLL version of the libraries, an alternative is to link to the static version instead, then the libraries will be within your executable file. This can avoid issues of incompatible versions.

Regards,


David
0 Kudos
mecej4
Honored Contributor III
762 Views
You have not provided sufficient information on the failed runs. Please state (i) OS and compiler versions, (ii) the messages that were printed.

I doubt that anyone can produce an executable program that can be run on "every computer".
0 Kudos
Steven_L_Intel1
Employee
762 Views
When you say the executable "cannot run", what do you mean? What error message is given?
0 Kudos
flyhigher2009
Beginner
762 Views

The systerm I use:

Windows XP Professional 2002 with SP3
Intel core 2 Duo CPU
Intel visual fortran compiler integration package ID: w_cprof_p_11.1.060.

My problem:
I have made an interface to do the numerical calculation. When click the executable file, the interface will show up. After inputting the parameters and press the Run button, the calculation will start. This application work well on my own and some computers. But on some other computers, after pressing the
Run button, there is no response and the calculation does not start.


Thank you very much.

0 Kudos
Steven_L_Intel1
Employee
762 Views
Thanks. The "Run button" is part of the graphical interface you made? Is this a QuickWin project type application? Can you tell if the program is using a lot of CPU or is it just waiting? What operating system version is being used on computers where it doesn't work?
0 Kudos
flyhigher2009
Beginner
762 Views
Yes, the run button is a part of the interface of the QuickWin project.

If the calculation starts, the CPU will be occupied 100% on my computer.

This project works on my computer with Windows XP 2002 with SP3, but it does not
work on another computer with Winodws XP 2002 with SP2. I don't know why.


On my computer, even when CPU is 100% occupied, the program is runningafter the "Run" buttone is pressed. But on the computer where it does not work, I think it should not be the program waiting. it doesn't have response for a long time.


Bisheng
0 Kudos
Steven_L_Intel1
Employee
762 Views
Can you post or attach the main program part of your application? In particular, I want to see the loop at the end of the main program where you wait for it to finish.
0 Kudos
flyhigher2009
Beginner
762 Views

Thanks, steve.


! MAIN PROGRAM: CREATE THE PROJECT AS A QUICKWIN APPLICATION..

MODULE GEOTH

USE DFLOGM

USE DFLIB

USE DFNLS

USE DFWIN

INTEGER(4) event, ix, iy

CONTAINS

SUBROUTINE GEOPRO_START()

USE DFLIB

INTEGER(4) I4

TYPE (QWINFO) QW

TYPE(WXYCOORD) WXY

INTEGER(2) STATUS

!CALL OPENFILES

OPEN(UNIT=3, FILE='USER', TITLE='GeoPro')

! CLEAR THE SCREEN TO THE BACKGROUND COLOR.

I4 = SETBKCOLOR(0)

!CALL CLEARSCREEN($GCLEARSCREEN)

!CALL GRAPHICSMODE()

!GET THE APPLICATION'S CHILD WINDOW.

I4 = GETWSIZEQQ(3,QWIN$SIZECURR, QW)

! MAXIMIZE IT.

QW.TYPE = QWIN$MAX

I4 = SETWSIZEQQ(3, QW)

I4=SETEXITQQ(QWIN$EXITPERSIST)

do while (.TRUE.)

i4 = waitonmouseevent(MOUSE$RBUTTONDOWN, i4, ix, iy)

end do

END SUBROUTINE GEOPRO_START

SUBROUTINE GRAPHICSMODE()

USE DFLIB

LOGICAL MODESTATUS

INTEGER(2) MAXX, MAXY,HALFX,HALFY,ROWS,COLS

TYPE (WINDOWCONFIG) MYSCREEN

COMMON MAXX, MAXY,HALFX,HALFY,ROWS,COLS,MYSCREEN

!SET HIGHEST RESOLUTION GRAPHICS MODE.

MYSCREEN.NUMXPIXELS=-1

MYSCREEN.NUMYPIXELS=-1

MYSCREEN.NUMTEXTCOLS=-1

MYSCREEN.NUMTEXTROWS=-1

!MYSCREEN.NUMCOLORS=-1

MYSCREEN.FONTSIZE=-1

!MYSCREEN.TITLE = "GEOPRO "C !

MODESTATUS=SETWINDOWCONFIG(MYSCREEN)

!DETERMINE THE MAXIMUM DIMENSIONS.

MODESTATUS=GETWINDOWCONFIG(MYSCREEN)

MAXX=MYSCREEN.NUMXPIXELS - 1

MAXY=MYSCREEN.NUMYPIXELS - 1

HALFX = MAXX / 2

HALFY = MAXY/ 2

COLS = MYSCREEN.NUMTEXTCOLS

ROWS = MYSCREEN.NUMTEXTROWS

END SUBROUTINE GRAPHICSMODE

END MODULE GEOTH

!*********************************************************

! MAIN PROGRAM

PROGRAM GEOPRO

USE GEOTH

CALL GEOPRO_START()

END PROGRAM GEOPRO

0 Kudos
Steven_L_Intel1
Employee
762 Views
Interesting - I did not see what I expected to see. What is the purpose of the loop at the end of GEOPRO_START? Are there menu items added that you did not show here? That loop would cause the main program to pause waiting for the next right button press. I assume the user could use menus to select other operations. Usually, I recommend that the "wait" loop contain a:

CALL SLEEPQQ(200)

to cause the main thread to wait for 200ms each time, waiting for the user to close the application from the other thread.
0 Kudos
flyhigher2009
Beginner
762 Views
Thanks a lot, Steve. The problem is fixed.

Previously I put three buttons on the interface, one of which is to stop the program. Later I deleted this button, but I forgot to delete the commandsrelated tothis button. The commands for this button look like this: if thebuttonstate is true, the program will stop.

As I didn't assign a value to the initial state of this button, the value is arbitrary. On some computers, it is"true", the program will stop when thecommands realated to this button is reached. But on some other
computers, thestate of thisbutton isFALSE,so the program works well.


Now I deleted the commands related to this button, the application works well.


Anyway,thank you very much for your patience.


Bisheng
0 Kudos
Steven_L_Intel1
Employee
762 Views
Glad to hear it!
0 Kudos
Reply