Hello,
I'm trying to compile a simple .f90 file for use in Elmer 9.0 (windows - I have Windows 11 ), i.e.
elmerf90 -o heat.so heat.f90
--- heat.f90 --- (not sure the detail is relevant since it's not starting the compiler, but here is code)
FUNCTION heat( Model, n, t ) RESULT(P)
USE Types
IMPLICIT NONE
TYPE(Model_t) :: Model
INTEGER :: n,i
REAL(Kind=dp) :: arrval
OPEN(2, file = 'WperKG.txt', status = 'old')
do i = 1,n
read(2,*) arrval
end do
P = arrval
close(2)
-----------
and am getting the error:
F951.exe ...
"The code execution cannot proceed because MVCR80.dll was not found. Reinstalling the program may fix this problem."
As far as I know, MVC...dll's are for Visual Studio C. Does Windows think I am using a C compiler? I didn't think I needed Visual C for the stripped-down Fortran in the Elmer installation. Is there a way around this? something I can put on the command line?
TIA,
DH
elmerf90 issue: MVCR80.dll not found?
-
- Posts: 2428
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: elmerf90 issue: MVCR80.dll not found?
I tried it on W10 and I did not receive an error, it worked. fine.
I do not have a MVCR80.dll on my system
By what method did you install Elmer?
I do not have a MVCR80.dll on my system
By what method did you install Elmer?
Re: elmerf90 issue: MVCR80.dll not found?
I downloaded the nonmpi executable from Source forge: ElmerFEM-gui-nompi-Windows-AMD64.exe and installed it in folder : C:\Elmer90. Then set the environments and paths according to the CSC youtube tutorial : https://www.youtube.com/watch?v=xPDzlGYK_kM . I did verify that ElmerGUI does load and I have read in a mesh.
Re: elmerf90 issue: MVCR80.dll not found?
For LInux, use *.so:
elmerf90 -o heat.so heat.f90
For Windows, use *.dll:
elmerf90 -o heat.dll heat.f90
This will generate the output file 'heat.dll', which should work. If this doesn't help, then something else is going on...
elmerf90 -o heat.so heat.f90
For Windows, use *.dll:
elmerf90 -o heat.dll heat.f90
This will generate the output file 'heat.dll', which should work. If this doesn't help, then something else is going on...
Re: elmerf90 issue: MVCR80.dll not found?
Sourceforge has old Elmer installers. It is recommended to use the latest Windows installers located here:
https://www.nic.funet.fi/pub/sci/physic ... n/windows/
You may also want to follow the installation instructions in GetStartedElmer.pdf, located here:
https://www.nic.funet.fi/pub/sci/physics/elmer/doc/
https://www.nic.funet.fi/pub/sci/physic ... n/windows/
You may also want to follow the installation instructions in GetStartedElmer.pdf, located here:
https://www.nic.funet.fi/pub/sci/physics/elmer/doc/
Re: elmerf90 issue: MVCR80.dll not found?
I initially installed the mpi version as detailed in the GettingStarted.pdf and ran several tutorials successfully in ElmerGUI. But because I ultimately wanted nodewise body force distributions, I tried the elmerf90 compile from the cmd line. (I had already run elmergrid succesfully from the cmd line several times to convert meshes.) Alas, my attempt to compile in that environment resulted in the MSVC80.dll requirement error. Next I downloaded the SourceForge nonmpi .exe installer, and, again, no luck, which prompted this thread. Finally I did as just suggested and downloaded from the Elmer page (ElmerFEM-gui-nompi-Windows-AMD64.zip), unzipped , set path variables, etc. All three of these downloads result in successful running of the elmergui tutorials. But all three result in the MSVCR80.dll error when attempting to compile an .f90 file.
I suspect that this has something to do with having other Windows packages (e.g. Ansys Zemax OpticStudio) on my PC which requires Visual C redistributable software - but I can't delete these (necessary for my livliehood). I will try one last attempt: installing and running Elmer FEM on a Windows 7 PC, and post the result.
I suspect that this has something to do with having other Windows packages (e.g. Ansys Zemax OpticStudio) on my PC which requires Visual C redistributable software - but I can't delete these (necessary for my livliehood). I will try one last attempt: installing and running Elmer FEM on a Windows 7 PC, and post the result.
Re: elmerf90 issue: MVCR80.dll not found?
One possibility is that the path to Elmer is in the last position in the list of paths. Refer to Fig 4.2 in GetStartedElmer.pdf. Click on Path, then Edit, which should open the list of path entries. Select the path to Elmer/bin, and move it up to the top position. You may need to edit the environment variable for both the current user and for the system, to be sure.
Re: elmerf90 issue: MVCR80.dll not found?
The f90 file finally compiled w/o the "MSCVR80.dll not found" error. Apparently it was a path error. The \lib path in the Windows environment was still pointing to the original mpi version folder in C:\Program Files\Elmer9.0-.... which for some reason wasn't deleted when I uninstalled. Once I defined the path to directly point to the \lib and \bin directories in the current nonmpi install, i.e. ...;C:\Elmer90\bin; C:\Elmer90\lib in my case, I no longer get the error, and the f90 file compiles.
Although I have no idea why, apparently using Elmer \bin and/or \lib directories in a Program Files folder is not a good idea (maybe Elmer never found them due to the space, and Windows does what Windows does in that case?)
Thanks to both of you for the prompt responses.
Maybe this will be quicker, but I'm not sure where to put the Procedure command for the .dll in the GUI inputs. This is a fairly simple system: 1 solver with 1 heat equation, 1 body, 1 boundary. Based on a few other posts, I currently have the file HeatSource.dll in my project folder, and am just putting the line:
Procedure "HeatSource"
in the Body Force -> Volume sources -> Heat Source menu bar, and am getting the following error in the Solver log:
Loading user function library: [HeatSource]...[]
Load: FATAL: Can't find procedure [_]
Am I missing another procedure? or do I need to specify this procedure somewhere else?
Although I have no idea why, apparently using Elmer \bin and/or \lib directories in a Program Files folder is not a good idea (maybe Elmer never found them due to the space, and Windows does what Windows does in that case?)
Thanks to both of you for the prompt responses.
Maybe this will be quicker, but I'm not sure where to put the Procedure command for the .dll in the GUI inputs. This is a fairly simple system: 1 solver with 1 heat equation, 1 body, 1 boundary. Based on a few other posts, I currently have the file HeatSource.dll in my project folder, and am just putting the line:
Procedure "HeatSource"
in the Body Force -> Volume sources -> Heat Source menu bar, and am getting the following error in the Solver log:
Loading user function library: [HeatSource]...[]
Load: FATAL: Can't find procedure [_]
Am I missing another procedure? or do I need to specify this procedure somewhere else?
-
- Posts: 2428
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: elmerf90 issue: MVCR80.dll not found?
You have to define the procedure and the file name it is located in
first variable is the file second is the procedure name, you can have multiple procedures in 1 DLL
Procedure "HeatSource" "funtionname"
first variable is the file second is the procedure name, you can have multiple procedures in 1 DLL
Procedure "HeatSource" "funtionname"
Re: elmerf90 issue: MVCR80.dll not found?
Good to hear that you figured out the path issue.
Take a look at the consistency tests located in github: https://github.com/ElmerCSC/elmerfem, under elmerfem/fem/tests.
One example that includes an F90 user function is:
Most of the menus in ElmerGUI include free text boxes, which allow addition of commands such as
returnType Procedure "SourceFileName" "FunctionIncludedInSourceFile"
So in your case, if the source file is HeatSource.F90 and the called function is HeatSource, then enter:
Real Procedure "HeatSource" "HeatSource"
The above consistency test should help a lot with the fine details.
Take a look at the consistency tests located in github: https://github.com/ElmerCSC/elmerfem, under elmerfem/fem/tests.
One example that includes an F90 user function is:
.elmerfem\fem\tests\RaviartThomas3D
Most of the menus in ElmerGUI include free text boxes, which allow addition of commands such as
returnType Procedure "SourceFileName" "FunctionIncludedInSourceFile"
So in your case, if the source file is HeatSource.F90 and the called function is HeatSource, then enter:
Real Procedure "HeatSource" "HeatSource"
The above consistency test should help a lot with the fine details.