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

ifort: command line error: File not found: '_obj_win64/*.obj'

shen__jianbo
Beginner
2,387 Views

Hello, I'm an initiate of intel visual fortran compiler, I have installed visual studio 2017 version and Intel Parallel Studio XE2019. My purpose is to create a dynamic library(dll) with 2 fortran codes using intel visual fortran compiler.

After opening the intel compiler command window, first I set 2 environment variables, and then I enter the command line, but there is an error: ifort: command line error: File not found: '_obj_win64/*.obj'.

Hereafter is the code in intel compiler command window:

Intel(R) MPI Library 2019 Update 3 for Windows* Target Build Environment for Intel(R) 64 applications
Copyright 2007-2019 Intel Corporation.

Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
Intel(R) Compiler 19.0 Update 3 (package 203)

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.9.12
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files (x86)\IntelSWTools>set RAD_USERLIB_SDK_PATH=C:\"Program Files"\Altair\14.0\hwsolvers\radioss\userlib_sdk

C:\Program Files (x86)\IntelSWTools>set RAD_USERLIB_ARCH=win64

C:\Program Files (x86)\IntelSWTools>cd C:\sample

C:\sample>%RAD_USERLIB_SDK_PATH%\%RAD_USERLIB_ARCH%\build_userlib_win64.bat /STARTER"LECMUSER99.f" /ENGINE"LUSER99.f"

C:\sample>echo off


*********************************************
** Generating Radioss Dynamic User Library **
*********************************************

Preparing Library
-----------------


Creating library: libraduser_win64.dll
----------------

ifort: command line error: File not found:  '_obj_win64/*.obj'

Done
----

My 2 fortran codes "LECMUSER99.f" and "LUSER99.f" are in the C:\sample folder.

Could someone help me to solve this problem? Thanks very much.

0 Kudos
17 Replies
Steve_Lionel
Honored Contributor III
2,387 Views

We'd have to know what ifort command was generated by the script, but it is clearly wrong in that it is mangling the input file specification. This isn't a compiler problem.

0 Kudos
shen__jianbo
Beginner
2,387 Views

Steve Lionel (Ret.) (Blackbelt) wrote:

We'd have to know what ifort command was generated by the script, but it is clearly wrong in that it is mangling the input file specification. This isn't a compiler problem.

Dear Steve, thanks for your response. My aim is to use "RAD_USERLIB_SDK" to create a dll with user subroutines(fortran codes), here is the command line:  C:\sample>%RAD_USERLIB_SDK_PATH%\%RAD_USERLIB_ARCH%\build_userlib_win64.bat /STARTER"LECMUSER99.f" /ENGINE"LUSER99.f"  ,where "build_userlib_win64.bat " is a batch script in %RAD_USERLIB_SDK_PATH% folder.

During the compiling process, a folder named "_obj_win64" appears in the current directory C:\sample, but all of a sudden(maybe 0.1s) it disappears, and then the error ifort: command line error: File not found:  '_obj_win64/*.obj' happens. I wonder if there is a problem with the current directory? which means that it can't create a folder in C:\sample?

0 Kudos
Steve_Lionel
Honored Contributor III
2,387 Views

Please create a copy of the .bat file, changing the file type to .txt, and attach it to a reply here. Something is going wrong in the .bat file in that it is constructing an invalid ifort command. Please understand that it is the batch file that has a problem, and not the compiler.

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,387 Views

FWIW _obj_win64 sounds like a (not) defined variable in your make file (that was intended to specify the location of your *.obj files). By not being defined in  the make file (or SET variable for batch file) the plaintext was used.

Jim Dempsey

0 Kudos
shen__jianbo
Beginner
2,387 Views

Dear Steve, Dear Jim, thanks for your responses. I have attached the .txt file type of "build_userlib_win64.bat". There are some sentences about "_obj_win64" in this file but I can't understand them. In addition, the file "build_userlib_win64.bat" is created automatically when installing the software "Altair Hyperworks", I'm now using a finite element solver called "Radioss" in "Altair Hyperworks". I would appreciate it if you could have a look at this file.

0 Kudos
Steve_Lionel
Honored Contributor III
2,387 Views

Ok. The command that gets the error is:

ifort /nologo /DLL /MT -o %libname% _obj_win64/*.obj

This batch file creates a subfolder called _obj_win64. It then extracts modules from a static library called libraduser_sdk_win64.lib in the "Preparing library" step. This library was created outside the script. It could be that no objects were extracted. so that the command that creates the DLL can't find them.

The first thing I would do is create a copy of this .bat file and change the first line from "echo off" to "echo on", and then run this script instead of the original. I'd look to see just what was being done in the "Preparing Library" step. Also look to see what the contents of the _obj_win64 folder are.

0 Kudos
mecej4
Honored Contributor III
2,387 Views

I wonder if ifort /nologo /DLL /MT -o %libname% _obj_win64/*.obj should have been ifort /nologo /DLL /MT -o %libname% _obj_win64\*.obj -- that is, should a backslash character have been used as the path component delimiter.

0 Kudos
shen__jianbo
Beginner
2,387 Views

Dear Steve, thanks for your advice! I've done what you advised me to do, the attached file is the content in the command window.

Hereafter is the content  in the "Preparing library" step:

Preparing Library
-----------------

C:\sample\_obj_win64>if "none" == "none" GOTO STARTER

C:\sample\_obj_win64>if "none" == "none" GOTO ENGINE

C:\sample\_obj_win64>if "none" == "none" GOTO :LINK

C:\sample\_obj_win64>echo.


C:\sample\_obj_win64>echo.


C:\sample\_obj_win64>echo Creating library: libraduser_win64.dll
Creating library: libraduser_win64.dll

C:\sample\_obj_win64>echo ----------------
----------------

C:\sample\_obj_win64>echo.


C:\sample\_obj_win64>cd ..

C:\sample>ifort /nologo /DLL /MT -o libraduser_win64.dll  _obj_win64/*.obj
ifort: command line error: File not found:  '_obj_win64/*.obj'

C:\sample>del /q _obj_win64\*.*

C:\sample>rmdir _obj_win64

C:\sample>GOTO :END

C:\sample>echo.


C:\sample>echo Done
Done

C:\sample>echo ----
----

I do not really understand what the content means in the  command window, it seems that the _obj_win64 folder has not been created in the end.

0 Kudos
Steve_Lionel
Honored Contributor III
2,387 Views

This is all very helpful. Thanks. Unless I am mistaken, the problem is that the command line you gave was incorrect. Try this:

%RAD_USERLIB_SDK_PATH%\%RAD_USERLIB_ARCH%\build_userlib_win64.bat /STARTER "LECMUSER99.f" /ENGINE "LUSER99.f"

I added a space after /STARTER and /ENGINE. See what that does.

0 Kudos
shen__jianbo
Beginner
2,387 Views

Thanks Steve. You are right, it should exist a space after /STARTER and /ENGINE. But it still can't create the object .dll file, there is another error during the compiling process: fortcom: Severe: Invalid argument. I attached the content in the command window.

Someone else had the same error on this forum before: https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/391234 .

I wonder if there is an influence because when installing intel fortran compiler, I only chose the 64 bit box and ignored the I32 box?

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,387 Views

Look at this:

LECMUSER99.f
fortcom: Severe: Invalid argument

... file is 'Files\Altair\14.0\hwsolvers\radioss\userlib_sdk/win64 /Qcpp /Qaxsse3 /Qopenmp /O2 /fp:precise /Qftz /extend-source   -DMYREAL8 -DR8 /c ..\LECMUSER99.f'
compilation aborted for Files\Altair\14.0\hwsolvers\radioss\userlib_sdk/win64 /Qcpp /Qaxsse3 /Qopenmp /O2 /fp:precise /Qftz /extend-source   -DMYREAL8 -DR8 /c ..\LECMUSER99.f (code 1)

This indicates that likely your quotes are goofed up due to the option switches being viewed as part of the file name.

(quote 'Files\... /c ..\LECMUSER99.f' enquote)

You have to be careful using quote marks within a batch file.

Jim Dempsey

0 Kudos
andrew_4619
Honored Contributor II
2,387 Views

To re-state #8,  in _obj_win64/*.obj  the / should be \ ? Hence>

ifort: command line error: File not found:  '_obj_win64/*.obj'

 

0 Kudos
shen__jianbo
Beginner
2,387 Views

andrew_4619 wrote:

To re-state #8,  in _obj_win64/*.obj  the / should be \ ? Hence>

ifort: command line error: File not found:  '_obj_win64/*.obj'

 

Thanks for your remind andrew. I've tried to change "/" to "\" but it doesn't work, the error became ifort: command line error: File not found:  '_obj_win64\*.obj'.

0 Kudos
Steve_Lionel
Honored Contributor III
2,387 Views

I think this is a problem in your initial commands:

set RAD_USERLIB_SDK_PATH=C:\"Program Files"\Altair\14.0\hwsolvers\radioss\userlib_sdk

Try this instead:

set RAD_USERLIB_SDK_PATH="C:\Program Files\Altair\14.0\hwsolvers\radioss\userlib_sdk"

0 Kudos
shen__jianbo
Beginner
2,388 Views

Thanks Jim, thanks Steve. Your suggestions are quite helpful. I've done what Steve suggested me to do and It extracted modules from libraduser_sdk_win64.lib in the "Preparing library" step. But when compiling "LECMUSER99.f", it indicated ifort: command line remark #10148: option '/Qcpp' not supported. And when compiling "LUSER99.f", there are some errors:

ifort: command line remark #10148: option '/Qcpp' not supported
..\LUSER99.f(129): error #6460: This is not a field name that is defined in the encompassing structure.   [UPSXX]
         UPSXX = USERBUF%UPSXX
-------------------------^
..\LUSER99.f(130): error #6460: This is not a field name that is defined in the encompassing structure.   [UPSYY]
         UPSYY = USERBUF%UPSYY
-------------------------^
..\LUSER99.f(131): error #6460: This is not a field name that is defined in the encompassing structure.   [UPSZZ]
         UPSZZ = USERBUF%UPSZZ
-------------------------^
..\LUSER99.f(132): error #6460: This is not a field name that is defined in the encompassing structure.   [UPSXY]
         UPSXY = USERBUF%UPSXY
-------------------------^
..\LUSER99.f(133): error #6460: This is not a field name that is defined in the encompassing structure.   [UPSYZ]
         UPSYZ = USERBUF%UPSYZ
-------------------------^
..\LUSER99.f(134): error #6460: This is not a field name that is defined in the encompassing structure.   [UPSXZ]
         UPSXZ = USERBUF%UPSXZ
-------------------------^
compilation aborted for ..\LUSER99.f (code 1)

 

At the end of the compiling process, there is another error:

eng_sigeps99.obj : error LNK2019: unresolved external symbol LUSER99 referenced in function ENG_SIGEPS99
libraduser_win64.dll : fatal error LNK1120: 1 unresolved externals

In the current directory C:\sample, it generated libraduser_win64.exp and libraduser_win64.lib. I wonder if the error #10148 is just a warning that means it doesn't affect the result of the compilation? And if the error #6460 and error LNK2019 are solved, the libraduser_win64.dll can generate in the current directory? I attached the content that was generated in the command window.

0 Kudos
jimdempseyatthecove
Honored Contributor III
2,388 Views

In LUSER99.f you have either:

a) A user defined type (USERBUF) that does not contain field variables UPSXX, UPSYY, ...
    or
b) The subroutine/function with the error is being compiled with IMPLICIT variable typing and thus USERBUF%xxx causes USERBUF to implicitly be considered as a (undefined) user defined type.

You will have to look at the code to resolve this.

The linker error is a result of LUSER88.f not being compiled.

Jim Dempsey

0 Kudos
Steve_Lionel
Honored Contributor III
2,388 Views

I don't recall /Qcpp being a supported option. Replace that with /fpp . 

0 Kudos
Reply