PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Programming with two languages (Please advise)
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Torkin



Joined: 18 Apr 2012
Posts: 31

PostPosted: Fri Mar 14, 2014 9:20 am    Post subject: Reply with quote

I do have Cygwin. Please understand that this is my first time to use it. So could you please tell me what to type to get the Makefile going?

I have failed to find anyone online who explains it clearly.

Thank you Mat
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6125
Location: The Portland Group Inc.

PostPosted: Fri Mar 14, 2014 9:45 am    Post subject: Reply with quote

Quote:
So could you please tell me what to type to get the Makefile going?

Type "make".

Though, you might want to review the makefile docs for an overview.
http://www.gnu.org/software/make/manual/make.html

Also, the make commands I used are all in the article.
Back to top
View user's profile
Torkin



Joined: 18 Apr 2012
Posts: 31

PostPosted: Fri Mar 14, 2014 10:01 am    Post subject: Reply with quote

Thank you for the very helpful replies Mat.
Is this the nvcc incompatibility you had predicted?
I do have MVS 2010 installed and CUDA 5.5.
Any ideas on what I could do next?
I hope that I am not boring you to death. :)

Ahmed

Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6125
Location: The Portland Group Inc.

PostPosted: Fri Mar 14, 2014 10:17 am    Post subject: Reply with quote

Hi Ahmed,

Quote:
Is this the nvcc incompatibility you had predicted?
Nope, this is a different one. nvcc use's Microsoft's cl compiler to compile the host portion of the code, so expect it to be in your PATH.

You can set the PATH to cl in the Cygwin environment via "export PATH=<path_to_cl>;$PATH".

or edit the pgi.bat file and add it there (using DOS set commands, follow the example already in pgi.bat).

While you'll need to reopen the Cygwin window, I'd recommend adding it to pgi.bat so will always be set.

- Mat
Back to top
View user's profile
Torkin



Joined: 18 Apr 2012
Posts: 31

PostPosted: Fri Mar 14, 2014 10:32 am    Post subject: Reply with quote

Hey Mat
Getting there... Can you notice why this external is not being read?
Ahmed

Code:

PGI$ cd Desktop/pgi_mc_example
PGI$ make clean
rm -rf *.out ./obj/*.o *.mod
PGI$ make
pgfortran -fast -c -Iinc ./src/mcUtils.F90 -o ./obj/mcUtils.o
pgfortran -fast -c -Iinc -Mpreprocess  -DITER=10  -Mconcur=innermost -Minfo=par
./src/mcCPU.F90 -o ./obj/mcCPU.o
montecarlo_cpu:
     28, Parallel code generated with block distribution for inner loop if trip
count is greater than or equal to 100
     44, Loop not parallelized: may not be beneficial
pgfortran -fast -c -Iinc -Mpreprocess  -DITER=10 -DMCTYPE=0 ./src/monte_drv.F90
-o ./obj/monte_drv_cpu.o
pgfortran -fast   -Mconcur=innermost -Minfo=par ./obj/monte_drv_cpu.o ./obj/mcUt
ils.o ./obj/mcCPU.o -o mcCPU.out
pgfortran -ta=nvidia -fast -c -Iinc -Mpreprocess  -DITER=10 -Minfo=accel ./src/m
cACC.F90 -o ./obj/mcACC.o
montecarlo_acc:
     25, Generating local(temp(:))
         Generating copyin(y(:))
         Generating copyin(x(:))
     31, Generating compute capability 1.0 binary
         Generating compute capability 2.0 binary
     32, Loop is parallelizable
         Accelerator kernel generated
         32, !$acc do parallel, vector(256) ! blockidx%x threadidx%x
             CC 1.0 : 4 registers; 64 shared, 16 constant, 0 local memory bytes;
 100% occupancy
             CC 2.0 : 12 registers; 4 shared, 84 constant, 0 local memory bytes;
 100% occupancy
     41, Loop is parallelizable
         Accelerator kernel generated
         41, !$acc do parallel, vector(256) ! blockidx%x threadidx%x
             CC 1.0 : 7 registers; 1088 shared, 32 constant, 0 local memory byte
s; 100% occupancy
             CC 2.0 : 10 registers; 1032 shared, 80 constant, 0 local memory byt
es; 100% occupancy
         42, Sum reduction generated for suma
         43, Sum reduction generated for sumsq
pgfortran -ta=nvidia -fast -c -Iinc -Mpreprocess  -DITER=10 -Minfo=accel -DMCTYP
E=1 ./src/monte_drv.F90 -o ./obj/monte_drv_acc.o
pgfortran -fast  -ta=nvidia ./obj/monte_drv_acc.o ./obj/mcUtils.o ./obj/mcACC.o
 -o mcACC.out
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 ./src/mcCUF_1.F90 -o ./o
bj/mcCUF_1.o
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 -DMCTYPE=11 ./src/monte_
drv.F90 -o ./obj/monte_drv_cuf1.o
pgfortran -fast  -Mcuda ./obj/monte_drv_cuf1.o ./obj/mcUtils.o ./obj/mcCUF_1.o
-o mcCUF_1.out
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 ./src/mcCUF_2.F90 -o ./o
bj/mcCUF_2.o
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 -DMCTYPE=12 ./src/monte_
drv.F90 -o ./obj/monte_drv_cuf2.o
pgfortran -fast  -Mcuda ./obj/monte_drv_cuf2.o ./obj/mcUtils.o ./obj/mcCUF_2.o
-o mcCUF_2.out
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 ./src/mcCUF_3.F90 -o ./o
bj/mcCUF_3.o
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 -DMCTYPE=13 ./src/monte_
drv.F90 -o ./obj/monte_drv_cuf3.o
pgfortran -fast  -Mcuda ./obj/monte_drv_cuf3.o ./obj/mcUtils.o ./obj/mcCUF_3.o
-o mcCUF_3.out
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 ./src/mcCUF_4.F90 -o ./o
bj/mcCUF_4.o
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 -DMCTYPE=14 ./src/monte_
drv.F90 -o ./obj/monte_drv_cuf4.o
pgfortran -fast  -Mcuda ./obj/monte_drv_cuf4.o ./obj/mcUtils.o ./obj/mcCUF_4.o
-o mcCUF_4.out
pgfortran -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 ./src/mcCUF_5.F90 -o ./o
bj/mcCUF_5.o
pgfortran -DUSE_GPU_RNG -Mcuda -fast -c -Iinc -Mpreprocess  -DITER=10 -DMCTYPE=1
5 ./src/monte_drv.F90 -o ./obj/monte_drv_cuf5.o
nvcc -O3 -c -Iinc ./src/MersenneTwister_kernel.cu -o ./obj/MersenneTwister_kerne
l.o
pgfortran -fast  -Mcuda ./obj/monte_drv_cuf5.o ./obj/mcUtils.o ./obj/mcCUF_5.o .
/obj/MersenneTwister_kernel.o -o mcCUF_5.out
mcCUF_5.o : error LNK2019: unresolved external symbol randomgpu__entry reference
d in function mccuf_5_montecarlo_cuf5_
mcCUF_5.out : fatal error LNK1120: 1 unresolved externals
make: *** [mcCUF_5.out] Error 2
PGI$
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group