Jatukam
February 11, 2010, 4:49pm
1
Hello,
edit : by the way, it is call Intel Visual Fortran and not IFORT under Windows
I had some hard times trying to make work both CUDA and IFORT in Visual Studio 2008. I looked all over the web, but didn’t find much answers.
So I give the one i found (maybe not the best), in case of there is people still stuck in this.
The name should not be exact since I try to translate it.
1.Create a new solution Visual Fortran
File > New project
Intel® Visual Fortran > Console Application
2. Download and install [url=“CUDA VS Wizard download | SourceForge.net ”]http://sourceforge.net/projects/cudavswizard/[/url]
3. Add a new project in your solution
Visual C++ > CUDAWinApp
Choose Static library, uncheck “Precompiled headerâ€
4. Right click on one of the two project → Project dependencies
Choose Fortran project and check the box matching the Cpp/CUDA project
5. Right click on the Fortran Project → define as starting project
6. Code both Fortran and Cuda
7. Make an interface for CUDA in the Fortran
INTERFACE
SUBROUTINE my_function_cuda(…) BIND©
USE, INTRINSIC :: ISO_C_BINDING
…arguments declaration
END SUBROUTINE
END INTERFACE
8. Add generation rules for CUDA
Right click on the Cuda Project > Custom generation rules
Find an existing file > choose the file Cuda rules from the Nvidia SDK (common/ directory)
9.Right click on the Fortran Project > properties
Linker > General
add $(CUDA_LIB_PATH) to “Additional Library Directoriesâ€
Linker > Input
add cudart.lib to “Additional Dependenciesâ€
Done ! hope you do not catch arthrosis doing all this clicking.
Matt
PS: Thanks to the cuda wizard guys and to the website, which i forgot the name, for the last steps of this solution
Hello,
edit : by the way, it is call Intel Visual Fortran and not IFORT under Windows
I had some hard times trying to make work both CUDA and IFORT in Visual Studio 2008. I looked all over the web, but didn’t find much answers.
So I give the one i found (maybe not the best), in case of there is people still stuck in this.
The name should not be exact since I try to translate it.
1.Create a new solution Visual Fortran
File > New project
Intel® Visual Fortran > Console Application
Download and install http://sourceforge.n…s/cudavswizard/
Add a new project in your solution
Visual C++ > CUDAWinApp
Choose Static library, uncheck “Precompiled headerâ€
Right click on one of the two project → Project dependencies
Choose Fortran project and check the box matching the Cpp/CUDA project
Right click on the Fortran Project → define as starting project
Code both Fortran and Cuda
Make an interface for CUDA in the Fortran
INTERFACE
SUBROUTINE my_function_cuda(...) BIND©
USE, INTRINSIC :: ISO_C_BINDING
...arguments declaration
END SUBROUTINE
END INTERFACE
Add generation rules for CUDA
Right click on the Cuda Project > Custom generation rules
Find an existing file > choose the file Cuda rules from the Nvidia SDK (common/ directory)
9.Right click on the Fortran Project > properties
Linker > General
add $(CUDA_LIB_PATH) to “Additional Library Directoriesâ€
Linker > Input
add cudart.lib to “Additional Dependenciesâ€
Done ! hope you do not catch arthrosis doing all this clicking.
Matt
PS: Thanks to the cuda wizard guys and to the website, which i forgot the name, for the last steps of this solution
Hey Thanks for this…
I tried following your steps on VS 2005 and Latest CUDA Toolkit and 32 BIT VS wizard.
I seem to get multiple errors of the sort
"error LNK2019: unresolved external symbol _cudaMalloc referenced in function … "
I am not sure whats wrong as I have added cudart.lib to the linker…
I generally do all my work in Linux ; this Windows (xp) + VS 2005 is new to me (my advisor wants me to make some code)… hence any help from anyone will be great ?
thanks in advance…
Nitin
Hello,
edit : by the way, it is call Intel Visual Fortran and not IFORT under Windows
I had some hard times trying to make work both CUDA and IFORT in Visual Studio 2008. I looked all over the web, but didn’t find much answers.
So I give the one i found (maybe not the best), in case of there is people still stuck in this.
The name should not be exact since I try to translate it.
1.Create a new solution Visual Fortran
File > New project
Intel® Visual Fortran > Console Application
Download and install http://sourceforge.n…s/cudavswizard/
Add a new project in your solution
Visual C++ > CUDAWinApp
Choose Static library, uncheck “Precompiled headerâ€
Right click on one of the two project → Project dependencies
Choose Fortran project and check the box matching the Cpp/CUDA project
Right click on the Fortran Project → define as starting project
Code both Fortran and Cuda
Make an interface for CUDA in the Fortran
INTERFACE
SUBROUTINE my_function_cuda(...) BIND©
USE, INTRINSIC :: ISO_C_BINDING
...arguments declaration
END SUBROUTINE
END INTERFACE
Add generation rules for CUDA
Right click on the Cuda Project > Custom generation rules
Find an existing file > choose the file Cuda rules from the Nvidia SDK (common/ directory)
9.Right click on the Fortran Project > properties
Linker > General
add $(CUDA_LIB_PATH) to “Additional Library Directoriesâ€
Linker > Input
add cudart.lib to “Additional Dependenciesâ€
Done ! hope you do not catch arthrosis doing all this clicking.
Matt
PS: Thanks to the cuda wizard guys and to the website, which i forgot the name, for the last steps of this solution
Hey Thanks for this…
I tried following your steps on VS 2005 and Latest CUDA Toolkit and 32 BIT VS wizard.
I seem to get multiple errors of the sort
"error LNK2019: unresolved external symbol _cudaMalloc referenced in function … "
I am not sure whats wrong as I have added cudart.lib to the linker…
I generally do all my work in Linux ; this Windows (xp) + VS 2005 is new to me (my advisor wants me to make some code)… hence any help from anyone will be great ?
thanks in advance…
Nitin