[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #CFG-498469]: Errors occur when building the NetCDF with Intel Foxtran OneAPI



Hello,

Unfortunately, there is no official support for netCDF Fortran in Windows, yet. 
 What version were you able to use previously, and which versions of netCDF-C 
and netCDF-Fortran are you attempting to use now?

-Ward

> Dear NetCDF Team,
> 
> In the past, we can integrate Netcdf with Intel Parallel Studio in
> our foxtran project successfully. I have been trying to integrate
> NetCDF with the latest OneAPI using Visual Studio 2019. I set the
> "additional including directories" in the Foxtran section to the folder
> "NetCDFLib\x64\include" and set the "Additional library Directory" to
> the folder NetCDFLib\x64\lib properly (Please see the attached files
> for more details).
> 
> I see the following errors after building the project
> 
> ------ Build started: Project: EFDCPlus_MPI_10.3.0, Configuration: 64SP_D_MPI 
> x64 ------
> Linking...
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_DEF_VAR_MANYDIMS referenced in function 
> MOD_NETCDF_mp_NC_DEFINE_VARS
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_DEF_VAR_DEFLATE referenced in function 
> MOD_NETCDF_mp_NC_DEFINE_VARS
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_ATT_TEXT referenced in function 
> MOD_NETCDF_mp_NC_DEFINE_VARS
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_ATT_ONE_FOURBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_DEFINE_VARS
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_CREATE referenced in function MOD_NETCDF_mp_NC_CREATE_FILE
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_DEF_DIM referenced in function MOD_NETCDF_mp_NC_CREATE_FILE
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_DEF_VAR_SCALAR referenced in function 
> MOD_NETCDF_mp_NC_CREATE_FILE
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_ATT_ONE_EIGHTBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_CREATE_FILE
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_ENDDEF referenced in function MOD_NETCDF_mp_NC_CREATE_FILE
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_CLOSE referenced in function MOD_NETCDF_mp_NC_CLOSE_FILE
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_STRERROR referenced in function MOD_NETCDF_mp_CHECK_ERR
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_VAR_1D_FOURBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_WRITE_SCALAR1D
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_VAR_2D_FOURBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_WRITE_SCALAR2D
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_VAR_3D_FOURBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_WRITE_SCALAR3D
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_VAR_4D_FOURBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_WRITE_CLASS3D
> od_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_VAR_2D_ONEBYTEINT referenced in function 
> MOD_NETCDF_mp_NC_WRITE_ZBOT
> mod_netcdf.obj : error LNK2019: unresolved external symbol 
> NETCDF_mp_NF90_PUT_VAR_1D_EIGHTBYTEREAL referenced in function 
> MOD_NETCDF_mp_NC_WRITE_SNAPSHOT
> SP_D_MPI\EFDCPlus_MPI_10.3.0.exe : fatal error LNK1120: 17 unresolved 
> externals
> 
> I tried all options of calling convention ("C, REFERENCE", "STDCALL 
> REFERENCE",
> "STDCALL", "CVF") and nothing works. You can see the vfproj file as belows:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <VisualStudioProject ProjectCreator="Intel Fortran" Keyword="Console 
> Application" Version="11.0" 
> ProjectIdGuid="{8F3F0269-93FE-4360-B2AD-B35BE7DA4202}">
> <Platforms>
> <Platform Name="Win32"/>
> <Platform Name="x64"/></Platforms>
> <Configurations>
> <Configuration Name="64SP_R_MPI|Win32">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true"/>
> <Tool Name="VFLinkerTool" SuppressStartupBanner="true"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64SP_R_MPI|x64" OutputDirectory="$(ConfigurationName)" 
> IntermediateDirectory="$(ConfigurationName)" 
> TargetName="$(ProjectName)_201118">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> MultiProcessorCompilation="true" Optimization="optimizeFull" 
> Preprocess="preprocessYes" 
> AdditionalIncludeDirectories="$(I_MPI_ROOT)\intel64\include;..\NetCDFLib\x64\include"
>  PreprocessorDefinitions="_WIN64;_WIN;_MPI;NCOUT;TRIAL" 
> UndefinePreprocessorDefinitions="_WIN32" OpenMP="OpenMPParallelCode" 
> FloatingPointExceptionHandling="fpe0" FloatingPointModel="source" 
> FloatingPointSpeculation="fpSpeculationSafe" 
> CallingConvention="callConventionCRef" Traceback="true" 
> RuntimeChecks="rtChecksNone" RuntimeLibrary="rtMultiThreadedDLL"/>
> <Tool Name="VFLinkerTool" OutputFile="$(OutDir)\$(TargetName).exe" 
> LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" 
> AdditionalLibraryDirectories="$(I_MPI_ROOT)\intel64\lib\release;..\NetCDFLib\x64\lib"
>  IgnoreDefaultLibraryNames="libcmt.lib;mscvrt.lib;libifcoremt.lib" 
> GenerateManifest="false" SubSystem="subSystemConsole" 
> StackReserveSize="10000000" InterproceduralOptimizations="false" 
> AdditionalDependencies="impi.lib netcdf4.lib netcdf_f.lib netcdf.lib"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64SP_D_MPI|Win32">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> LocalSavedScalarsZero="true" InitArrays="true"/>
> <Tool Name="VFLinkerTool" SuppressStartupBanner="true"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64SP_D_MPI|x64" OutputDirectory="$(ConfigurationName)" 
> IntermediateDirectory="$(ConfigurationName)">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> DebugInformationFormat="debugEnabled" MultiProcessorCompilation="true" 
> Optimization="optimizeDisabled" Preprocess="preprocessYes" 
> AdditionalIncludeDirectories="C:\Program Files 
> (x86)\Intel\oneAPI\mpi\2021.1.1\include;..\NetCDFLib\x64\include" 
> PreprocessorDefinitions="_WIN64;_WIN;_MPI;NCOUT;TRIAL;DEBUGGING" 
> UndefinePreprocessorDefinitions="_WIN32" OpenMP="OpenMPParallelCode" 
> FloatingPointExceptionHandling="fpe0" FloatingPointModel="source" 
> FloatingPointStackCheck="true" CallingConvention="callConventionCRef" 
> Traceback="true" RuntimeChecks="rtChecksAll" NullPointerCheck="true" 
> BoundsCheck="true" ArrayShapeCheck="true" UninitializedVariablesCheck="true" 
> DescriptorDataTypeCheck="true" DescriptorDataSizeCheck="true" 
> StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDebugDLL"/>
> <Tool Name="VFLinkerTool" OutputFile="$(OutDir)\$(TargetName).exe" 
> LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" 
> AdditionalLibraryDirectories="C:\Program Files 
> (x86)\Intel\oneAPI\mpi\2021.1.1\lib\debug;..\NetCDFLib\x64\lib" 
> IgnoreDefaultLibraryNames="libcmtd.lib;mscvrtd.lib;libifcoremt.lib" 
> GenerateDebugInformation="true" GenerateMapFile="true" 
> SubSystem="subSystemConsole" StackReserveSize="10000000" 
> InterproceduralOptimizations="false" AdditionalDependencies="impi.lib 
> netcdf4.lib netcdf_f.lib netcdf.lib"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true" 
> TargetEnvironment="midlTargetAMD64"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64DP_D_MPI|x64">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> DebugInformationFormat="debugEnabled" MultiProcessorCompilation="true" 
> Optimization="optimizeDisabled" Preprocess="preprocessYes" 
> AdditionalIncludeDirectories="$(I_MPI_ROOT)\intel64\include;..\NetCDFLib\x64\include"
>  PreprocessorDefinitions="_WIN64;_WIN;_MPI;NCOUT;TRIAL;DEBUGGING" 
> UndefinePreprocessorDefinitions="_WIN32" RealKIND="realKIND8" 
> LocalSavedScalarsZero="true" FloatingPointExceptionHandling="fpe0" 
> FloatingPointModel="source" FloatingPointStackCheck="true" 
> CallingConvention="callConventionCRef" Traceback="true" 
> RuntimeChecks="rtChecksAll" NullPointerCheck="true" BoundsCheck="true" 
> ArrayShapeCheck="true" StackFrameCheck="true" 
> RuntimeLibrary="rtMultiThreadedDLL"/>
> <Tool Name="VFLinkerTool" OutputFile="$(OutDir)\$(TargetName).exe" 
> LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" 
> AdditionalLibraryDirectories="$(I_MPI_ROOT)\intel64\lib\release" 
> IgnoreDefaultLibraryNames="libcmtd.lib;mscvrtd.lib;libifcoremt.lib" 
> GenerateDebugInformation="true" SubSystem="subSystemConsole" 
> StackReserveSize="10000000" InterproceduralOptimizations="false" 
> AdditionalDependencies="impi.lib netcdf4.lib netcdf_f.lib netcdf.lib"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true" 
> TargetEnvironment="midlTargetAMD64"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64DP_D_MPI|Win32">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> LocalSavedScalarsZero="true" InitArrays="true"/>
> <Tool Name="VFLinkerTool" SuppressStartupBanner="true"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64DP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> MultiProcessorCompilation="true" Optimization="optimizeFull" 
> Preprocess="preprocessYes" 
> AdditionalIncludeDirectories="$(I_MPI_ROOT)\intel64\include;..\NetCDFLib\x64\include"
>  PreprocessorDefinitions="_WIN64;_WIN;_MPI;NCOUT;TRIAL;DEBUGGING" 
> UndefinePreprocessorDefinitions="_WIN32" RealKIND="realKIND8" 
> LocalSavedScalarsZero="true" FloatingPointExceptionHandling="fpe0" 
> FloatingPointModel="source" FloatingPointStackCheck="true" 
> FloatingPointSpeculation="fpSpeculationSafe" 
> CallingConvention="callConventionCRef" Traceback="true" 
> RuntimeChecks="rtChecksNone" BoundsCheck="true" ArrayShapeCheck="true" 
> StackFrameCheck="true" RuntimeLibrary="rtMultiThreadedDLL"/>
> <Tool Name="VFLinkerTool" OutputFile="$(OutDir)\$(TargetName).exe" 
> LinkIncremental="linkIncrementalNo" SuppressStartupBanner="true" 
> AdditionalLibraryDirectories="$(I_MPI_ROOT)\intel64\lib\release" 
> IgnoreDefaultLibraryNames="libcmtd.lib;mscvrtd.lib;libifcoremt.lib" 
> SubSystem="subSystemConsole" StackReserveSize="10000000" 
> InterproceduralOptimizations="false" AdditionalDependencies="impi.lib 
> netcdf4.lib netcdf_f.lib netcdf.lib"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true" 
> TargetEnvironment="midlTargetAMD64"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" SuppressStartupBanner="true"/></Configuration>
> <Configuration Name="64DP_R_MPI|Win32">
> <Tool Name="VFFortranCompilerTool" SuppressStartupBanner="true" 
> LocalSavedScalarsZero="true" InitArrays="true"/>
> <Tool Name="VFLinkerTool" SuppressStartupBanner="true"/>
> <Tool Name="VFResourceCompilerTool"/>
> <Tool Name="VFMidlTool" SuppressStartupBanner="true"/>
> <Tool Name="VFCustomBuildTool"/>
> <Tool Name="VFPreLinkEventTool"/>
> <Tool Name="VFPreBuildEventTool"/>
> <Tool Name="VFPostBuildEventTool"/>
> <Tool Name="VFManifestTool" 
> SuppressStartupBanner="true"/></Configuration></Configurations>
> <Files>
> <Filter Name="Header Files" Filter="fi;fd"/>
> <Filter Name="Resource Files" 
> Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"/>
> <Filter Name="Source Files" Filter="f90;for;f;fpp;ftn;def;odl;idl">
> <Filter Name="Drifter">
> <File RelativePath=".\Drifter\mod_drifter.f90"/>
> <File RelativePath=".\Drifter\Variables_MPI_Drifter.f90"/></Filter>
> <Filter Name="Eutrophication">
> <File RelativePath=".\Eutrophication\mod_diagen.f90"/>
> <Filter Name="JSON_Reader">
> <File RelativePath=".\JSON_Reader\fson.f90">
> <FileConfiguration Name="64SP_D_MPI|x64">
> <Tool Name="VFFortranCompilerTool" RuntimeChecks="rtChecksCustom" 
> NullPointerCheck="false"/></FileConfiguration></File>
> <File RelativePath=".\JSON_Reader\fson_path_m.f90"/>
> <File RelativePath=".\JSON_Reader\fson_string_m.f90"/>
> <File RelativePath=".\JSON_Reader\fson_value_m.f90"/></Filter>
> <Filter Name="MPI_Communication">
> <FileConfiguration Name="64SP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" 
> Optimization="optimizeDisabled"/></FileConfiguration></File>
> <File RelativePath=".\varalloc.f90">
> <FileConfiguration Name="64SP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" 
> Optimization="optimizeDisabled"/></FileConfiguration></File>
> <File RelativePath=".\varinit.f90">
> <FileConfiguration Name="64SP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" 
> Optimization="optimizeDisabled"/></FileConfiguration></File>
> <File RelativePath=".\varzeroint.f90">
> <FileConfiguration Name="64SP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" 
> Optimization="optimizeDisabled"/></FileConfiguration></File>
> <File RelativePath=".\varzeroreal.f90">
> <FileConfiguration Name="64SP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" 
> Optimization="optimizeDisabled"/></FileConfiguration></File>
> <File RelativePath=".\varzerosnl.f90">
> <FileConfiguration Name="64SP_R_MPI|x64">
> <Tool Name="VFFortranCompilerTool" 
> Optimization="optimizeDisabled"/></FileConfiguration></File>
> <File RelativePath=".\wasp4.f90"/>
> <File RelativePath=".\xyijconv.f90"/></Filter></Files>
> <Globals/></VisualStudioProject>
> 
> Do I need to rebuild Netcdf dll and lib using OneAPI C++ compiler?  I have 
> been trying to post in the intel foxtran community forum but I still can not 
> resolve this problem.  Please help me to resolve this issue as soon as 
> possible. Thanks  in advance.
> 
> Sincerely,
> 
> Cuong
> 
> 
> 


Ticket Details
===================
Ticket ID: CFG-498469
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.