Giter Club home page Giter Club logo

amica's People

Contributors

arnodelorme avatar japalmer29 avatar neuromechanist avatar nucleuscub avatar palday avatar yahiaali avatar

Stargazers

 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  avatar

amica's Issues

AMICA on EEGLAB 15

Dear Dr. Jason Palmer,

I would like to run AMICA on EEGLAB 15 by a batch script. I edited the code by Makoto, but I get the following error message.

Error using '
Transpose on ND array is not defined. Use PERMUTE instead.

I am sorry, but could you tell me the wrong points in the command below?

cd('/Users/Warehouse/Document2/inference2018/epoched2019-2_correct')
allfiles = dir('*.set');
for n=1:length(allfiles)
loadName=allfiles(n).name;
dataName=loadName(1:end-4);

EEG = pop_loadset(loadName);
EEG.setname = dataName;

if isfield(EEG.etc, 'clean_channel_mask')
    dataRank = min([rank(double(EEG.data')) sum(EEG.etc.clean_channel_mask)]);
else
    dataRank = min(rank(double(EEG.data')));
end
runamica15(EEG.data, 'num_chans', EEG.nbchan,...
    'outdir', ['/Users/Warehouse/Document2/inference2018/epoched2019-2_correct/amicaout/' dataName],...
    'pcakeep', dataRank, 'num_models', 1,...
    'do_reject', 1, 'numrej', 15, 'rejsig', 3, 'rejint', 1);
EEG.etc.amica  = loadmodout15(['/Users/Warehouse/Document2/inference2018/epoched2019-2_correct/amicaout/' dataName]);
EEG.etc.amica.S = EEG.etc.amica.S(1:EEG.etc.amica.num_pcs, :); 
EEG.icaweights = EEG.etc.amica.W;
EEG.icasphere  = EEG.etc.amica.S;
EEG = eeg_checkset(EEG, 'ica');

Thank you in advance.

Sincerely,
-Shingo Tokimoto

Issue with mpich

Dear Dr. Jason Palmer,

I am having some issues with amica and would really appreciate if you could help me with this.

I've installed mpich using mpich2-1.4-win-x86-64.msi as an administrator and am trying to run some codes by Makoto.

I keep encountering the following errors as well as a pop up asking me to install mpich.

Errors:

 Error: num_samples entries is less than num_files in paramfile 
No gm present, setting num_models to 1
No W present, exiting
Reference to non-existent field 'W'.

Error in runamica15 (line 892)
    weights = mods.W(:,:,1);

Screenshot of pop up:
image

I am using EEGLAB v14.1.1, MATLAB R2016a on a 64bit machine and I open MATLAB as an administrator.

The codes I am trying to run are:

if isfield(EEG.etc, 'clean_channel_mask')
        dataRank = min([rank(double(EEG.data')) sum(EEG.etc.clean_channel_mask)]);
    else
        dataRank = rank(double(EEG.data'));
    end
    runamica15(EEG.data, 'num_chans', EEG.nbchan,...
        'outdir', 'C:\amicaResults\' ,...
        'pcakeep', dataRank, 'num_models', 1,...
        'do_reject', 1, 'numrej', 15, 'rejsig', 3, 'rejint', 1);
    EEG.etc.amica  = loadmodout15('C:\amicaResults\' );
    EEG.etc.amica.S = EEG.etc.amica.S(1:EEG.etc.amica.num_pcs, :);  % Weirdly, I saw size(S,1) be larger than rank. This process does not hurt anyway.
    EEG.icaweights = EEG.etc.amica.W;
    EEG.icasphere  = EEG.etc.amica.S;
    EEG = eeg_checkset(EEG, 'ica');

Thank you in advance for your help.

AMICA not working on NSG server

Hello, I've been trying to run AMICA on NSG server but it doesn't work. Attached the code I used to run it and the outputs I got.
the dataset I'm using is epoched.
I tried both running it using one node and using multiple nodes by setting numprocs=4 and both failed.
the input file:

%% test_script_amica_nsg.m
% add eeglab to path
eeglab; close;
 
% load dataset 
filepath = [ pwd filesep ];
filename = '23456.set';
EEG = pop_loadset(filename, filepath);
 
% define parameters
numprocs = 1;       % # of nodes (1-4: default 1)
max_threads = 24;   % # of threads (1-24: default = 24)
num_models = 1;     % # of models of mixture ICA 
max_iter = 3000;    % max number of learning steps
 
% run amica on NSG
outdir = [ pwd filesep 'amicaouttmp' filesep ];
runamica15_nsg(EEG, 'num_models',num_models, 'outdir',outdir, 'max_iter',max_iter);

output files STDOUT

                            < M A T L A B (R) >
                  Copyright 1984-2019 The MathWorks, Inc.
              R2019b Update 3 (9.7.0.1261785) 64-bit (glnxa64)
                             November 27, 2019

 
To get started, type doc.
For product information, visit www.mathworks.com.
 
[�Warning: Adding folders named 'resources' to the path is not supported:
/projects/ps-nsg/home/nsguser/applications_centos7/eeglab_new/functions/resources]� 
[�> In path (line 109)
  In addpath (line 86)
  In eeglab>addpathifnotinlist (line 2053)
  In eeglab>myaddpath (line 2082)
  In eeglab (line 287)
  In runAmica (line 3)]� 
eeglab: options file is ~/eeg_options.m
EEGLAB: adding "ANTeepimport" v1.13 (see >> help eegplugin_eepimport)
EEGLAB: adding "BCI2000import" v0.36 (see >> help eegplugin_BCI2000import)
EEGLAB: adding "BDFimport" v1.10 (see >> help eegplugin_bdfimport)
EEGLAB: adding "Biosig" to the path; subfolders (if any) might be missing from the path
EEGLAB: adding "Fieldtrip-lite" to the path; subfolders (if any) might be missing from the path
EEGLAB: adding "Fileio" to the path; subfolders (if any) might be missing from the path
EEGLAB: adding "MEF_import" v1.10 (see >> help eegplugin_mefimport)
EEGLAB: adding "NEUROPRAXimport" v1.00 (see >> help eegplugin_NEUROPRAXimport)
EEGLAB: adding "WearableSensing" v1.09 (see >> help eegplugin_pop_WearableSensing)
EEGLAB: adding "amica" v1.5.1 (see >> help eegplugin_amica)
EEGLAB: adding "bci2000legacy" v1.0 (see >> help eegplugin_bci2000legacy)
EEGLAB: adding "bdfimport" v1.1 (see >> help eegplugin_bdfimport)
EEGLAB: adding "biopac" v1.00 (see >> help eegplugin_biopac)
EEGLAB: adding "bva-io-" v1.5.13 (see >> help eegplugin_bva_io)
EEGLAB: adding "bva-io" v1.5.13 (see >> help eegplugin_bva_io)
EEGLAB: adding "cogniscan" v1.1 (see >> help eegplugin_cogniscan)
EEGLAB: adding "corrmap" v2.02.1 (see >> help eegplugin_corrmap)
EEGLAB: adding "ctfimport" v1.04 (see >> help eegplugin_ctfimport)
EEGLAB: adding "dipfit" v2.3 (see >> help eegplugin_dipfit)
EEGLAB: adding "egilegacy" v1.0 (see >> help eegplugin_egilegacy)
EEGLAB: adding "erpssimport" v1.01 (see >> help eegplugin_erpssimport)
EEGLAB: adding "firfilt" v1.6.2 (see >> help eegplugin_firfilt)
EEGLAB: adding "gtecimport" v3.15.01 (see >> help eegplugin_gtecimport)
EEGLAB: adding "import_NihonKodenM00files" v1.11 (see >> help eegplugin_importNihonKodenM00)
EEGLAB: adding "instepascimport" v1.00 (see >> help eegplugin_ascinstep)
EEGLAB: adding "loadcurry" v2.0 (see >> help eegplugin_loadcurry)
EEGLAB: adding "loadhdf5v" v1.1 (see >> help eegplugin_loadhdf5)
EEGLAB: error while adding plugin "eegplugin_mffimport"
   Error using error
Function is not defined for 'cell' inputs.
EEGLAB: adding "mffmatlabio" v2.01 (see >> help eegplugin_mffmatlabio)
EEGLAB: adding "musemonitor" v3.1 (see >> help eegplugin_musemonitor)
EEGLAB: adding "neuroimaging4d" v1.00 (see >> help eegplugin_4dneuroimaging)
EEGLAB: adding "neuroneimport" v1.0.3.4 (see >> help eegplugin_neurone)
EEGLAB: adding "neuroscanio" v1.1 (see >> help eegplugin_neuroscanio)
EEGLAB: adding "procominfinity" v1.00 (see >> help eegplugin_procom)
EEGLAB: adding "snapmaster" v1.0 (see >> help eegplugin_snapmaster)
EEGLAB: adding "xdf-EEGLAB" v1.14 (see >> help eegplugin_xdfimport)
[�Warning: Adding folders named 'resources' to the path is not supported:
/projects/ps-nsg/home/nsguser/applications_centos7/eeglab_new/functions/resources]� 
[�> In path (line 109)
  In addpath (line 86)
  In eeglab>addpathifnotinlist (line 2053)
  In eeglab>myaddpath (line 2082)
  In eeglab (line 287)
  In eeglab (line 1084)
  In runAmica (line 3)]� 
pop_loadset(): loading file /projects/ps-nsg/home/nsguser/ngbw/workspace/NGBW-JOB-EEGLAB_TG-985C5F6F32174E75A1931EDA1AD2E76B/12456/12456.set ...
Running AMICA on single node ...
INTERNAL ERROR: invalid error code ffffffff (Ring Index out of range) in rdma_cm_get_hostnames:1267
Warning: RDMA CM Initialization failed. Continuing without RDMA CM support. Please set MV2_USE_RDMA_CM=0 to disable RDMA CM.
           1 processor name = comet-18-44.sdsc.edu
           1 host_num =   1457401042
 This is MPI process           1 of           1 ; I am process           1 of
           1 on node: comet-18-44.sdsc.edu
           1  : node root process           1 of           1
Processing arguments ...
forrtl: severe (66): output statement overflows record, unit -5, file Internal Formatted Write
Image              PC                Routine            Line        Source             
amica15c           0000000000E88B8B  Unknown               Unknown  Unknown
amica15c           0000000000E86B97  Unknown               Unknown  Unknown
amica15c           000000000044D799  Unknown               Unknown  Unknown
amica15c           000000000040CD6C  Unknown               Unknown  Unknown
amica15c           000000000040A6B6  Unknown               Unknown  Unknown
libc.so.6          00002B5285D823D5  Unknown               Unknown  Unknown
amica15c           000000000040A529  Unknown               Unknown  Unknown
Oops! AMICA did not run succesfully...
`

STDERR
`

{�Unrecognized function or variable 'filename'.

Error in runamica15_nsg (line 922)
if exist(filename,'file')

Error in runAmica (line 18)
runamica15_nsg(EEG, 'num_models',num_models, 'outdir',outdir,
'max_iter',max_iter);
}� 

`

Experience with CUDA Fortran?

Hi Jason,
Is there any success with compiling the code to run in CUDA fortran for use with eGPU on Mac or internal NVIDIA GPU on ubuntu? Is it possible to share the steps for that if there has been a successful CUDA implementation of the code?
Thanks very much for any insight you can share.
Best, Michael

Fixing random seed

Hi,

I opened the issue about random seed before.
(#29 (comment))

And as you recommended, I could get the constant results after setting 'fix_init = 1'.
But the components look like not extracted well, so I tried to find the another way to get stable results.

At first, I compiled amica with GNU fortran after fixing random_seed to 1. (build command is as bellow.)

  • On Debian GNU/Linux 11 (bullseye) with Intel chipset
    $ mpif90 -o amica15ub funmod2.f90 amica15.f90 libblas.a liblapack.a -L/usr/local/lib -I/usr/local/include -cpp -O3 -fopenmp -Xpreprocessor -ffree-line-length-512 -static -lblas -llapack

amica15.f90

! call random_seed(PUT = c1 * (myrank+1) * (seed+myrank+1))
call random_seed(size=seed_size)
allocate(seed(seed_size))
seed = 1
call random_seed(put=seed)

When I run the customized amica with 'block_size=1024', I can check the stable results(but not constant perfectly) and also components are extracted well.

But I worry about some potential side effect of above solution.
So If you don't mind, l would like to ask you review this and let me know the risks you think if exists.

Best regards,

When AMICA information is in the data, epoching does not work in EEGLAB unless plugin is loaded

Jeff Schmitz 2011-10-31 11:53:33 PDT
Then likely we should add eeg_formatamica() to the general release since AMICA is here to stay and should in due course become the new default ICA ...
(from Scott in an email)
[reply] [−]Comment 2Arnaud Delorme 2011-10-27 15:12:32 PDT
I am now assigning this bug to Ozgur.

Arno
[reply] [−]Comment 1Jeff Schmitz 2011-10-27 10:35:59 PDT
Hi Clemens,

Could you attach the data set with AMICA information? It will help me reproduce the bug for testing.

Thanks,

Jeff
[reply] [−]DescriptionClemens Brunner 2011-10-27 10:23:04 PDT
For data sets with AMICA information, epoching does not work unless the AMICA plugin is loaded. This is not very convenient; IMO, AMICA information should not have an influence on default EEGLAB functionality.

Specifically, I get the following error in line 240 of pop_epoch(): Undefined function 'eeg_formatamica()' for input arguments of type 'struct'.

Again, this only happens when the AMICA plugin is not loaded.

Issue with mpich

Hi Dr. Palmer,

I installed AMICA 1.5.1 using the eeglab plugin manager in MATLAB 2019b. When I run the pop_runamica() function from the eeglab gui I am prompted with the image below to install mpich, which I already installed. Once I finish, I am left with the following command window output:

No datfile field found in EEG structure. Will write temp file.
Writing data file: C:\Users\nater\OneDrive\Documents\College\Research\eeglab2021.0\tmpdata63236.fdt
A subdirectory or file C:\Users\nater\OneDrive\Documents\College\Research\eeglab2021.0\processedData\clean\amicaout\ already exists.
No gm present, setting num_models to 1
No W present, exiting
Reference to non-existent field 'W'.
Error in runamica15 (line 892)
weights = mods.W(:,:,1);
Error in pop_runamica (line 242)
[W,S,mods] = runamica15(EEG.data(:,:),arglist{:});
Error while evaluating Menu Callback.

image

Thanks in advance,
Nate Riek

LICENSE

Hey Jason,

We use Amica a lot over here at Brock University and I just wanted to thank you for you efforts.

Just was going through and was packaging some of your binaries and noticed you don't provide a license. GPL3 would be best or MIT. EEGLAB is LGPL so GPL might be a good fit anyway.

Thanks,

runamica15c error

From https://sccn.ucsd.edu/bugzilla/show_bug.cgi?id=1789

When running amica15c in the Matlab 2014a command line, I encountered this error for multiple datasets:

/home/jason/mpich2-1.5-install/bin/hydra_pmi_proxy: error while loading shared libraries: libmv.so.1: cannot open shared object file: No such file or directory
/home/jason/mpich2-1.5-install/bin/hydra_pmi_proxy: error while loading shared libraries: libmv.so.1: cannot open shared object file: No such file or directory
/home/jason/mpich2-1.5-install/bin/hydra_pmi_proxy: error while loading shared libraries: libmv.so.1: cannot open shared object file: No such file or directory

Here's the code that I was trying to run:

runamica15c(EEG.data, 'num_chans', EEG.nbchan, 'outdir', [pwd '/amica15out'], 'use_queue', 'qa1', 'numprocs', 64, 'do_reject', 1, 'numrej', 15, 'rejsig', 3, 'rejint', 1)

Any help would be much appreciated.

EEGLAB doesn't recognize EEG structure change after AMICA

I'm using the AMICA plugin for my decomposition, and after training is done and I use 'load AMICA components' I'd like to use File-->Save current dataset(s) to save the dataset with the weights in it. If I try that, I get a 'Dataset has not been modified; No need to resave it' message; I have to save the dataset as a completely new file instead.

I'd like to force EEGLAB to recognize the change so I can resave the file without having to create a new one.

Marissa

Errors while running AMICA on multiple nodes

Hi there,

I encounter an error while running AMICA models on multiple nodes of the NSG server.

The output file and the script are as follows. The script works well on single node.

Looking forward to you reply. Thanks!

Rowsline


The output file STDOUT:

EEGLAB: adding "bids-matlab-tools" v5.3.1 (see >> help eegplugin_bids)EEGLAB: adding "bva-io" v1.7 (see >> help eegplugin_bva_io)
EEGLAB: adding "clean_rawdata" v2.5 (see >> help eegplugin_clean_rawdata)
EEGLAB: adding "corrmap" v2.1 (see >> help eegplugin_corrmap)
EEGLAB: adding "dipfit" v4.3 (see >> help eegplugin_dipfit)
EEGLAB: adding "erpssimport" v1.01 (see >> help eegplugin_erpssimport)
EEGLAB: adding "firfilt" v2.4 (see >> help eegplugin_firfilt)
EEGLAB: adding "neuroscanio" v1.4 (see >> help eegplugin_neuroscanio)You are using the latest version of EEGLAB.

pop_loadset(): loading file /expanse/projects/nsg/home/nsguser/ngbw.expanse.nsgprod/workspace/NGBW-JOB-EEGLAB_EXPANSE-853217D17DB4472C875040EB1325CDCA/testAMICA/data0.set ...
Reading float file '/expanse/projects/nsg/home/nsguser/ngbw.expanse.nsgprod/workspace/NGBW-JOB-EEGLAB_EXPANSE-853217D17DB4472C875040EB1325CDCA/testAMICA/data0.fdt'...

Using Unix executable for Expanse supercomputer, you may need to recompile if you encounter librairy errors
Writing data file: /expanse/projects/nsg/home/nsguser/ngbw.expanse.nsgprod/workspace/NGBW-JOB-EEGLAB_EXPANSE-853217D17DB4472C875040EB1325CDCA/testAMICA/tmpdata81472.fdt

ans = 0

/bin/bash: qconf: command not found
ssh: relocation error: ssh: symbol EVP_KDF_ctrl version OPENSSL_1_1_1b not defined in file libcrypto.so.1.1 with link time reference
No gm present, setting num_models to 1
No W present, exiting


The script I used:

%% test_script_amica.m
% add eeglab to path
eeglab; close;

% load dataset
filepath = [ pwd filesep ];
filename = 'data0.set';
EEG = pop_loadset(filename,filepath);

% define parameters
numprocs = 3; % # of nodes (1-4: default 1)
max_threads = 24; % # of threads (1-24: default = 24)
num_models = 5; % # of models of mixture ICA
max_iter = 2000; % max number of learning steps

% run amica on NSG
outdir = [ pwd filesep 'EEGAMICA' filesep ];
runamica15(EEG.data, 'num_models',num_models, 'outdir',outdir, ...
'numprocs', numprocs, 'max_threads', max_threads, 'max_iter',max_iter);

Run time error with MPICH3.3 on macbook

Dear folks,
I was trying to install and run mpich3.3 on my mac. The compile I think it's ok. However, I got this runtime error:
_Fatal error in MPI_Init: Other MPI error, error stack:

MPIR_Init_thread(565)..............:
MPID_Init(224).....................: channel initialization failed
MPIDI_CH3_Init(105)................:
MPID_nem_init(324).................:
MPID_nem_tcp_init(178).............:
MPID_nem_tcp_get_business_card(425):
MPID_nem_tcp_init(384).............: gethostbyname failed, Mac (errno 1)

Could anyone please help me point out the issue and inform me how to solve it?

Performance issue in eeglab?

When I run the amica binary test on the example data provided on your old website (with max_threads tweaked to match the number of cores on my system), all of the cpus will go to 100% utilization. However, when I use amica though eeglab on my own data with the same max_threads setting, the utilization of a few cpus stays around 5-10% with 20-40% bursts. Any idea what might be causing less-than-full cpu utilization in eeglab?

EDIT: I should note, this is using a binary I compiled myself on a centos machine. I used the mpiifort compiler (instead of ifort) from parallel_studio_xe_2017 and mpich-3.2.

Torque support

I have access to a Rocks cluster at my university but it uses Torque not SGE. Any chance we can work to get AMICA working on non SGE based clusters?

(Another) Reference to non-existent field 'W' error ....

Hi all,
It seems I am producing an error that has been reported and discussed a few times already. I have read through the previous posts (and suggested fixes), however I am unable to stop the error from occuring. I have included the readout from the MATLAB command below - could someone please help me with stopping this error.

MPIR_Init_thread(474)..............:
MPID_Init(190).....................: channel initialization failed
MPIDI_CH3_Init(89)................:
MPID_nem_init(320).................:
MPID_nem_tcp_init(173).............:
MPID_nem_tcp_get_business_card(420):
MPID_nem_tcp_init(384).............: gethostbyname failed, habs-hr-2zdv30 (errno 1)
[unset]: write_line_error; fd=-1 buf:cmd=abort exitcode 3191311
:
system msg for write_line failure : Bad file descriptor
Something went wrong...
No gm present, setting num_models to 1
No W present, exiting**
Reference to non-esistent field 'W'

Error in runamica15 (line 892)
weights = mods.w(:,:,1);

Error in pop_runica (line239)
[W,S,mods] = runamica15(datfile,arglist{:};

Error while evaluating Menu Callback

Issue with folders containing special characters

I noticed that there is an issue of AMICA v1.5.1 on EEGLab 15 when the data.set is in a path containing round-bracket characters "(" or ")". The error message is
/bin/bash: -c: line 0: syntax error near unexpected token `('
My fix right now is to move the data.set to another directory. Since Dropbox automatically creates folders with round-bracket characters to distinguish private and institution sync folders, I would like to know if there is a cure for this issue. Thank you.

correct way to call mpirun with AMICA on multiple machines

Hello,

I'm currently trying to work with AMICA on a distributed cluster (not using a job scheduler, but machines that can connect to each other via SSH) on the command line, so outside of MATLAB. I'm working with the sample data for now for testing purposes (Memorize.fdt, amicadefs.param).

Suppose I have a hostfile with two hosts defined as

host1 slots=1
host2 slots=1

when I run this command

mpirun -np 2 --cpus-per-proc 10 -machinefile hostfile amica15ub amicadefs.param

it does spin up two processes successfully, one on each host. However, it appears it's just running 2 separate AMICA runs (as opposed to running 1 AMICA run and sharing information across the processes); for example, see the following output

 iter     1 lrate =  0.1000000000 LL =  -2.4660826212 nd =  0.0396225707, D =   0.21150E-01  0.21150E-01  (  1.15 s,   0.6 h)
 iter     1 lrate =  0.1000000000 LL =  -2.4647405397 nd =  0.0393720804, D =   0.20560E-01  0.20560E-01  (  1.00 s,   0.6 h)
 iter     2 lrate =  0.1000000000 LL =  -2.4083273442 nd =  0.0139898858, D =   0.15982E-01  0.15982E-01  (  0.98 s,   0.5 h)
 iter     2 lrate =  0.1000000000 LL =  -2.4085044656 nd =  0.0135491076, D =   0.15504E-01  0.15504E-01  (  1.17 s,   0.6 h)
 iter     3 lrate =  0.1000000000 LL =  -2.3987433791 nd =  0.0127810935, D =   0.12500E-01  0.12500E-01  (  1.20 s,   0.7 h)
 iter     3 lrate =  0.1000000000 LL =  -2.3988822199 nd =  0.0124826162, D =   0.12684E-01  0.12684E-01  (  0.96 s,   0.5 h)

Is there something I'm missing in order to do distributed AMICA runs correctly?

Thanks in advance

Amica code in pop_select of EEGLAB (calling functions in this repository)

It should be pop_select.m line 374... computing something related to amica.

[reply] [−]Comment 1Makoto 2011-06-09 18:19:42 PDT

I confirmed it happened 2 out of 10.

[reply] [−]DescriptionMakoto 2011-06-09 18:09:36 PDT

I tried to select data based on selected channels using pop_select.m from GUI, but it never worked. After several times of failure, I noticed that out of nowhere new channels 'prob1' 'prob2' suddenly appeared and attached to the last channel. when pop_select.m re-runs for the second time.

This did not happen for other subjects, so I don't know what is the reason for this. Do you have any idea what 'prob1' 'prob2' are?

Makoto

RedHat 8 - forrtl: severe (174): SIGSEGV, segmentation fault occurred

Hello,

I'm currently trying to run the amica15ub binary and on RedHat 7 everything works as intended, however on RedHat 8 I get the following error:

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source   
amica15ub          000000000116EB35  Unknown               Unknown  Unknown
amica15ub          000000000116C8F7  Unknown               Unknown  Unknown
amica15ub          0000000001122954  Unknown               Unknown  Unknown
amica15ub          0000000001122766  Unknown               Unknown  Unknown
amica15ub          00000000010D4D19  Unknown               Unknown  Unknown
amica15ub          00000000010D8F90  Unknown               Unknown  Unknown
amica15ub          00000000005D21F0  Unknown               Unknown  Unknown
libnss_files.so.2  0000152B02387BD0  Unknown               Unknown  Unknown
libnss_files.so.2  0000152B02382834  Unknown               Unknown  Unknown
libnss_files.so.2  0000152B02383A0D  Unknown               Unknown  Unknown
libnss_files.so.2  0000152B02383B42  Unknown               Unknown  Unknown
amica15ub          00000000011F7263  Unknown               Unknown  Unknown
amica15ub          00000000011F7003  Unknown               Unknown  Unknown
amica15ub          00000000004EAE27  Unknown               Unknown  Unknown
amica15ub          00000000004E3B69  Unknown               Unknown  Unknown
amica15ub          00000000004D9C2D  Unknown               Unknown  Unknown
amica15ub          00000000004D1F65  Unknown               Unknown  Unknown
amica15ub          000000000048A6C4  Unknown               Unknown  Unknown
amica15ub          0000000000489DBE  Unknown               Unknown  Unknown
amica15ub          000000000046D05D  Unknown               Unknown  Unknown
amica15ub          000000000040531A  Unknown               Unknown  Unknown
amica15ub          00000000004021DE  Unknown               Unknown  Unknown
amica15ub          000000000118C1A4  Unknown               Unknown  Unknown
amica15ub          00000000004020C1  Unknown               Unknown  Unknown

This seems related to another issue thread (#21), however that didn't fix my issue.

Any assistance would be appreciated.

question about random seed

Hi,

I would like to ask you a question about random seed of amICA.

amICA is calling random_seed with multiplication of system clock and some other values.
There doesn't seem to be a parameter to fix random seed.

Could you explain me why amICA uses random indexing?
And are there any expected problem with setting a fixed seed number of amICA?

ex) call random_seed(100)

Because I want to get the same results for all runs, if the inputs are same.

I'm waiting your reply,

Thank you.

From EEGLABLIST "Reference to non-existent field 'W'.

Dear all,

I am in urgent need for helping me out find what the issue with AMICA.
EEGLAB v2019.1 the plugin amica1.5.1 already has the following files (amica15mkl.exe, eeg_loadamica.m, eegplugin_amica.m, loadmodout15.m, pop_runamica.m and runamica15.m). The mpich2-1.4-win-x86-64.msi and 32 is already inside the file

I have the following output

"Reference to non-existent field 'W'.

Error in runamica15 (line 892)
weights = mods.W(:,:,1);

Error in pop_runamica (line 239)
[W,S,mods] = runamica15(datfile,arglist{:});

Error while evaluating Menu Callback."

Would you please try to clarify simly what should I do. Also, I found the same issue with someone and one of the answers to make sure with the correct path. what path should I change? in the popupwindow there is in file: xxxxxxxxxxxxxxx
outdirectory:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Could you please verify what should be inside?
kindly notice I am using 64 bit windows 10

Issue with loading file using amica with onedrive

Hey, I am working on a project saved on a business OneDrive folder which includes spaces in the directory, which seems to be interferring with AMICA's loading/saving. C:\Users\xxxx\OneDrive - University of Bergen\xxxx\xxxx\xxxx\xxxx is the filepath, yet an issue appears where it seems to be only reading the path up to the first space, and creates folders in the working directory with the rest of the names from the path.
It seems to be able to find the file itself, so I believe it to be an issue with the 'outdir'. Furthermore, if I save the file on a local path, it still does not work, which I believe might be due to EEGLAB being saved in the OneDrive folder.

Here is the command line output when running test_amica.m:

You are using the latest version of EEGLAB.
pop_loadset(): loading file Memorize.set ...
Reading float file 'Memorize.fdt'...
Scaling components to RMS microvolt
eeg_checkset: recomputing the ICA activation matrix ...
Found datfile
A subdirectory or file amicaout\ already exists.
'C:\Users\xxxx\OneDrive' is not recognized as an internal or external command,
operable program or batch file.
Something went wrong...
No gm present, setting num_models to 1
No W present, exiting
Unrecognized field name "W".

Error in runamica15 (line 899)
weights = mods.W(:,:,1);

Error in pop_runamica (line 338)
[W,S,mods] = runamica15(g.datfile,arglist{:});

Error in test_amica (line 3)
EEG = pop_runamica(EEG, 'maxiter', 10, 'max_threads', 4);


Here is the command line output when running locally:

pop_loadset(): loading file C:\Users\xxxx\Desktop\amica\xxxx.set ...
Reading float file 'C:\Users\xxxx\Desktop\amica\xxxx.fdt'...
Creating a new ALLEEG dataset 2
Done
Found datfile
A subdirectory or file C:\Users\xxxx\Desktop\amica\amicaout\ already exists.
'C:\Users\xxxx\OneDrive' is not recognized as an internal or external command,
operable program or batch file.
Something went wrong...
No gm present, setting num_models to 1
No W present, exiting
Unrecognized field name "W".

Error in runamica15 (line 899)
weights = mods.W(:,:,1);

Error in pop_runamica (line 338)
[W,S,mods] = runamica15(g.datfile,arglist{:});

Error while evaluating Menu Callback.

Error in pop_runamica (line 341)
[W,S,mods] = runamica15(EEG.data(:,:),arglist{:});

Error while evaluating Menu Callback.

Error running runica from eeglab plugin - tar archive unrecognized

Hi everybody,

I want to use nsg to run amica. Just to familiarize with the framework and to see if everything works properly I decided to run first a test calling runica instead of runamica15_nsg but I am facing the following problem. It gives me an error because it does not succeed to open the tar archive because it does not recognize the file format (see bold text below). What I am doing wrong?

Thank you fro your help

OUT_EEG = pop_amicansg(EEG);
Saving dataset...
98 MAX_RUN_HOURS = 48;
OUT_EEG = pop_amicansg(EEG);
Saving dataset...
98 MAX_RUN_HOURS = 48;
74 end
Job has been submitted!
Accessing jobs on NSG...
Done.
Accessing job: "https://nsgr.sdsc.edu:8443/cipresrest/v1/job/[email protected]/NGBW-JOB-EEGLAB_TG-6A39ACFD03164153A650428EAAE4247C" on NSG...
Done.
Accessing jobs on NSG...
Done.
Accessing job: "https://nsgr.sdsc.edu:8443/cipresrest/v1/job/[email protected]/NGBW-JOB-EEGLAB_TG-6A39ACFD03164153A650428EAAE4247C" on NSG...
Done.
Job status on 12-4-2020 11:3:24 : COMPLETED
Accessing job: "https://nsgr.sdsc.edu:8443/cipresrest/v1/job/[email protected]/NGBW-JOB-EEGLAB_TG-6A39ACFD03164153A650428EAAE4247C" on NSG...
Done.
Accessing job: "https://nsgr.sdsc.edu:8443/cipresrest/v1/job/[email protected]/NGBW-JOB-EEGLAB_TG-6A39ACFD03164153A650428EAAE4247C/output" on NSG...
Done.
Accessing job: "https://nsgr.sdsc.edu:8443/cipresrest/v1/job/[email protected]/NGBW-JOB-EEGLAB_TG-6A39ACFD03164153A650428EAAE4247C/output/72203" on NSG...
tar: Error opening archive: Unrecognized archive format
Done.
File downloaded and decompressed in the
output folder specified in the settings
Accessing job: "https://nsgr.sdsc.edu:8443/cipresrest/v1/job/[email protected]/NGBW-JOB-EEGLAB_TG-6A39ACFD03164153A650428EAAE4247C" on NSG...
Done.
Accessing jobs on NSG...
Done.

Running a for loop with an ICA/AMICA without a window for each participant

I'm trying to create a for loop allowing me to run an AMICA for every participant on EEGLab using Matlab. Here's the script. On each participant, I have to click "OK" on a window and I'd like instead to let the program run everything. Is there a way to simply run an AMICA for each participant without having to press "OK" ? I thought setting the EEG.etc.auto_ok to 2 would have worked but it doesn't seem to be the case. Thanks !

`for s=1:nsubj

    fprintf('\n******\nProcessing subject %s\n******\n\n', subject_list{s});

    % Path to the folder containing the current subject's data
    data_path  = [home_path subject_list{s} '/'];
    
    sname      = [data_path subject_list{s} '.set'];
    
    if exist(sname, 'file')<=0
            fprintf('\n *** WARNING: %s does not exist *** \n', sname);
            fprintf('\n *** Skip all processing for this subject *** \n\n');
            
    else
        EEG = pop_loadset('filename', [subject_list{s} '.set'], 'filepath', data_path);
        EEG = pop_runamica(EEG);
        EEG.etc.auto_ok = 2;
        EEG.setname = [EEG.setname '_amicadone'];
        EEG = pop_saveset(EEG, 'filename', [EEG.setname '.set'], 'filepath', data_path)
        
    end    
 end

`

AMICA 15 plugin on Debian 10

Transfered from sccn/eeglab#136

Description

When using the following command to call AMICA, an error occurs on Debian 10:

[W,S,mods] = runamica15(EEG.data(:,:),'max_threads',1500,'max_iter',7);

eeglab14_1_1b/plugins/AMICA1.5.1/amica15c /Code/amicaouttmp/input.param: Segmentation fault
Something went wrong...
No gm present, setting num_models to 1
No W present, exiting
Reference to non-existent field 'W'.

Error in runamica15 (line 892)
    weights = mods.W(:,:,1);

The same error has occurred on 2 different computers with Debian 10. It does not happen when I use the exact same EEG data and the same command on Windows 10. Thus, it is possibly the binfile amica15c has not been updated for the Debian 10 OS.

Versions

OS version Debian10
Matlab version R2019a
EEGLAB version 14.1.1b

AMICA on cluster machine

Dear Dr. Jason Palmer,
Thank you for checking the issues we have with amica.
I'm trying to make AMICA work on a cluster machine. When I tried with the data set that comes with EEGLAB, amica seems to iterate just fine but when I try with the real data, I get only 7 iterations and then it stops.

this is the error message I got from the real data:

>> run runAmica
pop_loadset(): loading file /home/mohamed/bmaold/subma.set ...
Warning: the name of the dataset has changed on disk, updating EEG structure accordingly
Reading float file '/home/mohamed/bmaold/subma.fdt'...
Scaling components to RMS microvolt
Writing data file: /home/mohamed/bmaold/tmpdata81472.fdt
 1 processor name = falcon
 1 host_num =  1281896239
 This is MPI process 1 of 1 ; I am process 1 of 1 on node: falcon
 1  : node root process 1 of 1
Processing arguments ...
 num_files =  1
 FILES:
 /home/mohamed/bmaold/tmpdata81472.fdt
 num_dir_files =  1
 initial matrix block_size =  128
 do_opt_block =  0
 blk_min =  256
 blk_step =  256
 blk_max =  1024
 number of models =  1
 max_thrds =  32
 use_min_dll =  1
 min dll =  1.00000000000000006E-9
 use_grad_norm =  1
 min grad norm =  9.99999999999999955E-8
 number of density mixture components =  3
 pdf type =  0
 max_iter =  2000
 num_samples =  1
 data_dim =  128
 field_dim =  768
 do_history =  0
 histstep =  10
 share_comps =  0
 share_start =  100
 comp_thresh =  0.98999999999999999
 share_int =  100
 initial lrate =  5.00000000000000028E-2
 minimum lrate =  1.00000000000000002E-8
 minimum data covariance eigenvalue =  9.9999999999999998E-13
 lrate factor =  0.5
 initial rholrate =  5.00000000000000028E-2
 rho0 =  1.5
 min rho =  1.
 max rho =  2.
 rho lrate factor =  0.5
 kurt_start =  3
 num kurt =  5
 kurt interval =  1
 do_newton =  1
 newt_start =  50
 newt_ramp =  10
 initial newton lrate =  1.
 do_reject =  0
 num reject =  3
 reject sigma =  3.
 reject start =  2
 reject interval =  3
 write step =  20
 write_nd =  0
 write_LLt =  1
 dec window =  1
 max_decs =  3
 fix_init =  0
 update_A =  1
 update_c =  1
 update_gm =  1
 update_alpha =  1
 update_mu =  1
 update_beta =  1
 invsigmax =  100.
 invsigmin =  0.E+0
 do_rho =  1
 load_rej =  0
 load_c =  0
 load_gm =  0
 load_alpha =  0
 load_mu =  0
 load_beta =  0
 load_rho =  0
 load_comp_list =  0
 do_mean =  1
 do_sphere =  1
 doPCA =  1
 pcakeep =  128
 pcadb =  30.
 byte_size =  4
 doscaling =  1
 scalestep =  1
mkdir: cannot create directory ‘/home/mohamed/bmaold/amicaouttmp/’: File exists
 output directory = /home/mohamed/bmaold/amicaouttmp/
 1 : setting num_thrds to  32  ...
 1 : using 32 threads.
 1 : node_thrds =  32
 bytes in real =  4
 1 : REAL nbyte =  4
 getting segment list ...
 blocks in sample =  768
 total blocks =  768
 node blocks =  768
 node  1  start: file  1  sample  1  index  1
 node  1  stop : file  1  sample  1  index  768
 1 : data =  42.12274169921875 -22.660226821899414
 getting the mean ...
  mean =  19.213357688044198 -3.6652333481858173 11.912760259234346
 subtracting the mean ...
 getting the sphering matrix ...
 cnt =  768
 doing eig nx =  128  lwork =  163840
 minimum eigenvalues =  4.76517915723355459E-2 5.44860527342523465E-2 6.17080211329246175E-2
 maximum eigenvalues =  3456.1695873535355 1986.8285709131624 527.06571703521831
 num eigs kept =  128
 sphering the data ...
 numeigs =  128
 1 Allocating variables ...
 1 : Initializing variables ...
 1 : block size =  128
 1 : entering the main loop ...
 iter     1 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =   0.68564E-01  0.68564E-01  (  0.00 s,   0.0 h)
 iter     2 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =           NaN          NaN  (  0.00 s,   0.0 h)
 iter     3 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =           NaN          NaN  (  0.00 s,   0.0 h)
 iter     4 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =           NaN          NaN  (  0.00 s,   0.0 h)
 iter     5 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =           NaN          NaN  (  0.00 s,   0.0 h)
 iter     6 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =           NaN          NaN  (  0.00 s,   0.0 h)
 iter     7 lrate =  0.0500000000 LL =   0.0000000000 nd =           NaN, D =           NaN          NaN  (  0.00 s,   0.0 h)
 Exiting because likelihood increasing by less than  1.00000000000000006E-9  for more than  5  iterations ...
... done. Execution time:   0.00 h
 output directory = /home/mohamed/bmaold/amicaouttmp/
Something went wrong...
No gm present, setting num_models to 1
No W present, exiting
Reference to non-existent field 'W'.

Error in runamica15 (line 892)
    weights = mods.W(:,:,1);

Error in runAmica (line 16)
    [weights,sphere,mods] = runamica15(EEG.data, 'num_models',num_models, 'outdir',outdir, ...


Error in run (line 63)
evalin('caller', [script ';']);

Best Regards,

Issue handling one-file EEGLAB structs on PC?

Hi Jason,

When passed a EEGLAB EEG struct and the struct comes from a file that is saved as one file (ie: a .set) instead of two, EEG.datfile is empty ([]), thus line 729 (also line 738):
file = [dat.filepath filesep dat.datfile];
causes a directory instead of a file name to be passed to the input.param file(line 778), which then passes it to the binary which then tries to write to it and causes the following error:

forrtl: severe (9): permission to access file denied, unit 8, file C:\FeMMEEG\EEG\preica\amicaout  
Image              PC                Routine            Line        Source              
amica15mkl.exe     000000013F6B3B17  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F6AF402  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F66FFD1  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F655B5C  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F6550F7  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F632F8B  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F5D5579  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F5A6315  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013FA3C18C  Unknown               Unknown  Unknown 
amica15mkl.exe     000000013F69B24F  Unknown               Unknown  Unknown 
kernel32.dll       0000000076EC556D  Unknown               Unknown  Unknown 
ntdll.dll          000000007702385D  Unknown               Unknown  Unknown

I replaced the datfile method with the temp dat file method you used in the EEG.data input case, and then delete it at the end of the script in all cases which seems to avoid the problem. See attached: runamica15_pk.zip

AMICA on distributed systems crashing with large number of models and high density decompositions

I'm trying to run AMICA across a large number of nodes in a distributed fashion and I'm finding that for certain combinations of (1) num_models, (2) number of compute nodes and (3) the number of channels of the EEG data that AMICA crashes. I suspect it might be for very large number of compute nodes that there isn't enough data per node to do high density decompositions.

I was wondering if there were general rules about when AMICA would work in a distributed manner for say

T = length of the data
N = number of compute nodes
M = number of models
C = number of channels

Seems like T/N is the amount of data given per node, so it comes to some relationship between M and C for T/N, but it'd be nice if there was some guidance on what values of T/N/M/C would work for distributed AMICA.

Reference to non-existent field 'W'.

Hi

I am trying to run the following command for AMICA

runamica15(EEG.data, 'num_chans', EEG.nbchan,...
'outdir', AMICA_DIR,'pcakeep', laplaceEst,'num_models', 1, 'num_mix_comps', 5,...
'do_reject', 1, 'numrej', 15, 'rejsig', 3, 'rejint', 1);

And I am getting the following error:

Writing data file: /Users/bsevak/Documents/tmpdata39867.fdt
mkdir: /Users/bsevak/Documents/StrokeData/amicaout/: File exists
/bin/bash: /Users/bsevak/Documents/MATLAB: is a directory
Something went wrong...
No gm present, setting num_models to 1
No W present, exiting
Reference to non-existent field 'W'.
Error in runamica15 (line 892)
weights = mods.W(:,:,1);

Could you help me with the same?

doPCA

Hi,
In both runamica15 and runamica15_NSG, function help says default value for doPCA is 0, but the actual macro is 1. Also, there is no option to turn it off as an input to the function.
Can you please add the doPCA name pair to the input variables. I did it on my local copy of the functions, but for NSG, you should update it on repository and NSG itself.

Thanks

Unrecognized field name "W"

Hi there,

As reported by other users, sometimes a fresh install of the AMICA plugin leads to the following error:

No gm present, setting num_models to 1
No W present, exiting
Unrecognized field name "W".

Error in runamica15 (line 895)
    weights = mods.W(:,:,1);

Error in pop_runamica (line 341)
    [W,S,mods] = runamica15(EEG.data(:,:),arglist{:});
 
Error while evaluating Menu Callback.

I faced this problem when I installed the plugin through EEGLAB. However, no problems occurred when I manually downloaded the directory from Github. Other colleagues experienced the same issue. Comparing the two installation folders, the one installed from EEGLAB missed the libiomp5md.dll driver. Adding this file to the AMICA1.6.1 directory solved the problem and ICA started correctly.

Would it be possible to look into this?

Thank you!

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.