Re: [AMBER-Developers] Help with NVIDIA Compilation using ifort

From: Timothy J Giese <giese025.umn.edu>
Date: Fri, 26 Mar 2010 18:15:23 -0500

I've only done a few things with cuda/fortran, but I basically
treat it like how I treat c/fortran, i.e., in C, create
subroutine_ and have it simply call subroutine.

I've never really thought about pros and cons of this.

For example

void init_template_kernel_drv(int &, int &, int &);
void free_template_kernel_drv();
void run_template_kernel_drv(int &, double *);

extern "C"
{
   void init_template_kernel_(int &, int &, int &);
   void free_template_kernel_();
   void run_template_kernel_(int &, double *);
}


void init_template_kernel_(int & max_blocks,int & threads_per_block, int
& buflen)
{
   init_template_kernel_drv(max_blocks, threads_per_block, buflen);
}

void free_template_kernel_()
{
   free_template_kernel_drv();
}


void run_template_kernel_(int & na, double * A)
{
   run_template_kernel_drv(na, A);
}


I found some discussion on the intel boards. Not sure how
useful it is.

http://software.intel.com/en-us/forums/showthread.php?t=56872

-Tim


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Mar 26 2010 - 16:30:02 PDT
Custom Search