Coder Social home page Coder Social logo

gmmnlse-solver-final's People

Contributors

logangwright avatar wiselabaep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmmnlse-solver-final's Issues

Help to understand Calculate Tensors_single.cu

Hello,
First of all, thank you for the nice MMGNLSE code.
I am new to CUDA and therefore, find it difficult to understand the calculation of the overlap integrals in the CUDA file.
I would appreciate if anyone can help me to explain the below lines from the Calculate Tensors_single.cu file:
if (full_thread_idx >= nmp4) {
return;
}

// Turn linear index into components
unsigned int midx1 = full_thread_idx % num_modes;
unsigned int midx2 = (full_thread_idx/num_modes) % num_modes;
unsigned int midx3 = (full_thread_idx/num_modes/num_modes) % num_modes;
unsigned int midx4 = (full_thread_idx/num_modes/num_modes/num_modes);

// Compute the sum
for (int i = 0; i < Nx; i++) {
    for (int j = 0; j < Nx; j++) {
        SR[full_thread_idx] += fields[midx1+i*num_modes+j*Nxnm]*fields[midx2+i*num_modes+j*Nxnm]*fields[midx3+i*num_modes+j*Nxnm]*fields[midx4+i*num_modes+j*Nxnm];
    }
}

// Normalize
SR[full_thread_idx] /= norms[midx1]*norms[midx2]*norms[midx3]*norms[midx4];

Thanks in advance!

Something about fft and ifft

Hi:

I found a question: the fft function in your program is to transform from frequency domain to time domain, which is opposite to the essence of fft. Why can you do this? thank you so much who can answer my question.

why ii = 2:z_points ?

Hi all:

 Does anyone know why the step number ii begin from 2 not from 1? thanks so much.

%% Run the step function over each step
tic
for ii = 2:z_points
% Print the step number if verbose
if sim.verbose
t_in_loop = tic;
disp(ii)
end

Some questions about GMMNLSE_ss_step.m

Hi:
I want to run your process on CPU using the GMMNLSE_ss_step method, but there are some wrong when running it, can you help me, please? The question is below:

Error using .*
Matrix dimensions must agree.

Error in GMMNLSE_ss_step>get_dA_dz (line 99)
Vpl = dt*fft(hrw.*ifft(Vpl));

I checked hrw is a 327681 dimensional matrix, while Vpl is a 32768num_modes*num_modes dimensional matrix, so they can not multiply. On the other hand, when I set sim.fr = 0; sim.sw = 0; then Vpl will be Vpl = zeros(2^15,3,3,'single'); when I run the process again, there are some other wrong,

Matrix dimensions must agree.
Error in GMMNLSE_ss_step>get_dA_dz (line 110)
dA_dz = fft(prefactor.*ifft(Up));

So I want to know how to solve the question, besides, I don't understand the function dA_dz = get_dA_dz(A_t, dt, sim, mode_info, hrw, prefactor), I want to know the meaning of Up, Vpl, T_mn and want to understand how to solving nonlinear interactions.

I really want to run this program successfully, so please help me. At the same time thank you very much for sharing the source code.

Kerr beam self-cleaning

Hello:
Recently, I want to study the energy flowing among different modes in GRIN-MMF. I set the first mode (fundamental mode) with the highest fraction(30%) of total energy. The 2nd mode is about 17%, the 3rd mode is about 17%, the 4th mode is about 17%, and 5th mode is about 17%. Other high order modes play a role as the background.
Unexpectedly, at the output of the fiber, the 3rd mode obtains the most of total energy among all modes. This result dose not conform to the experiment. Therefore, I would like to know which parameters should be pay attention to, when this code is used for simulation?

CUDA_ERROR_LAUNCH_FAILED when running GMMNLSE_driver_gpu_1550_linear.m

Hi,

I came across a CUDA_ERROR_LAUNCH_FAILED error when trying to run the GMMNLSE_driver_gpu_1550_linear.m file. The full error output is as follows.

Warning: An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_FAILED 
> In GMMNLSE_propagate (line 37)
  In GMMNLSE_driver_gpu_1550_linear (line 74) 
Error using gpuArray/ifft
An error occurred during PTX compilation of <image>.
The information log was:

The error log was:

The CUDA error code was: CUDA_ERROR_LAUNCH_FAILED.

Error in GMMNLSE_MPA_step (line 96)
    Vpl = dt*fft(hrw.*ifft(Vpl));

Error in GMMNLSE_propagate (line 308)
        [num_it, last_result] = GMMNLSE_MPA_step(last_result, initial_condition.dt, sim, nonlin_const, mode_info, omegas, D_pos,
        D_neg, hrw);

Error in GMMNLSE_driver_gpu_1550_linear (line 74)
prop_output = GMMNLSE_propagate(fiber, initial_condition, sim); % This actually does the propagation

I believe the CUDA and VC toolchains I installed were working just fine. And other .m files like GMMNLSE_driver_gpu_1550_GRINMMS_XPM.m etc worked normally on my PC.

The error may be related to Line 22, fiber.SR = 0*SR; , in the GMMNLSE_driver_gpu_1550_linear.m file. Once I changed that line to like fiber.SR = 1e-6*SR; , the error disappeared and the result is almost the same to those shown in the Advanced Example pdf.

This could be a temporary solution for me and I don't know if other people had the same issue. Also, it would be nice if anyone knows a properer solution for this error. Thanks.

I will post my computing environment here for your reference.

Intel Xeon CPU E5-2620 [email protected]

CUDADevice with properties:

                  Name: 'Quadro K620'
                 Index: 1
     ComputeCapability: '5.0'
        SupportsDouble: 1
         DriverVersion: 9.1000
        ToolkitVersion: 8
    MaxThreadsPerBlock: 1024
      MaxShmemPerBlock: 49152
    MaxThreadBlockSize: [1024 1024 64]
           MaxGridSize: [2.1475e+09 65535 65535]
             SIMDWidth: 32
           TotalMemory: 2.1475e+09
   MultiprocessorCount: 3
          ClockRateKHz: 1124000
           ComputeMode: 'Default'
  GPUOverlapsTransfers: 1
KernelExecutionTimeout: 0
      CanMapHostMemory: 1
       DeviceSupported: 1
        DeviceSelected: 1

Windows10 Ver.1709

Cuda compilation tools, release 9.1, V9.1.85

Visual C++ 2015 toolset

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.